Expand description
Parser for the --status-style / --prompt-style CLI flags and the
per-format prompt_style config key. Maps a comma-separated token list
onto an ansi::Style.
Grammar:
spec := token ("," token)*
token := attr | "fg=" color | "bg=" color
attr := bold | dim | italic | underline | reverse
color := name | "#RRGGBB" | "0".."255"
name := ("bright-")? (black|red|green|yellow|blue|magenta|cyan|white)Empty input is treated as “no styling” and returns Ok(Style::default()).
Enums§
Functions§
- parse
- Parse a style spec into an
ansi::Style. Empty / whitespace-only input returnsStyle::default()so callers can treat empty CLI flags as “off”.