Skip to content

Latest commit

 

History

History
55 lines (34 loc) · 1.36 KB

promptfessional_section.md

File metadata and controls

55 lines (34 loc) · 1.36 KB

⬅ Promptfessional

Command: promptfessional section

Declares the start of a prompt section.

Restrictions

  • This must eventually be followed by either another promptfessional section, or promptfessional end.
    Failure to do so will result in the section not being displayed.

Usage

promptfessional section (OPTIONS) [SECTION_NAME]

Create a section:

promptfessional section my_section
    promptfessional show my_component
    promptfessional show my_other_component
promptfessional end

Query the current section color:

# Prints the current color.
# This is useful for components which need to reset to a default color.
promptfessional section --current-color

Options

Option Default Description
--pattern %s Set the printf pattern for the section.
This can be used to override the left and right padding.
--delimiter `` Set the delimiter between each component in the section.

Colors

Sections can be individually colored with the color section.[SECTION_NAME].

For example, for a section called foo, its color will be section.foo.

promptfessional color --set section.foo --background=red

Special Considerations

  • If the --pattern ends with a space and the last component ends with a space, only one trailing space will be printed.