wash_cli/
style.rs

1//! Styling for wash CLI
2//!
3//! These are originally the same styles used by clap_cargo as of v0.14.1
4//! see: https://docs.rs/clap-cargo/0.14.1/src/clap_cargo/style.rs.html
5
6use anstyle::{AnsiColor, Effects, Style};
7
8const HEADER: Style = AnsiColor::Green.on_default().effects(Effects::BOLD);
9const USAGE: Style = AnsiColor::Green.on_default().effects(Effects::BOLD);
10const LITERAL: Style = AnsiColor::Cyan.on_default().effects(Effects::BOLD);
11const PLACEHOLDER: Style = AnsiColor::Cyan.on_default();
12const ERROR: Style = AnsiColor::Red.on_default().effects(Effects::BOLD);
13const VALID: Style = AnsiColor::Cyan.on_default().effects(Effects::BOLD);
14const INVALID: Style = AnsiColor::Yellow.on_default().effects(Effects::BOLD);
15
16pub const WASH_CLI_STYLE: clap::builder::styling::Styles = clap::builder::styling::Styles::styled()
17    .header(HEADER)
18    .usage(USAGE)
19    .literal(LITERAL)
20    .placeholder(PLACEHOLDER)
21    .error(ERROR)
22    .valid(VALID)
23    .invalid(INVALID);