Expand description

anstyle_git::parse parses a color configuration string (in Git syntax) into an anstyle::Style:

Examples

let style = anstyle_git::parse("bold red blue").unwrap();
assert_eq!(style, anstyle::AnsiColor::Red | anstyle::AnsiColor::Blue | anstyle::Effects::BOLD);

let hyperlink_style = anstyle_git::parse("#0000ee ul").unwrap();
assert_eq!(hyperlink_style, anstyle::RgbColor(0x00, 0x00, 0xee) | anstyle::Effects::UNDERLINE);

Enums

Type for errors returned by the parser.

Functions

Parse a string in Git’s color configuration syntax into an ansi_term::Style.