Skip to content

Commit 94b642d

Browse files
etiennebacherDavisVaughan
authored andcommitted
init
1 parent 1502872 commit 94b642d

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

crates/air/src/args.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
11
use clap::Parser;
22
use clap::Subcommand;
3+
use clap::builder::Styles;
4+
use clap::builder::styling::{AnsiColor, Effects};
35
use std::path::PathBuf;
46

57
use crate::logging;
68

9+
// Configures Clap v3-style help menu colors
10+
const STYLES: Styles = Styles::styled()
11+
.header(AnsiColor::Green.on_default().effects(Effects::BOLD))
12+
.usage(AnsiColor::Green.on_default().effects(Effects::BOLD))
13+
.literal(AnsiColor::Cyan.on_default().effects(Effects::BOLD))
14+
.placeholder(AnsiColor::Cyan.on_default());
15+
716
#[derive(Parser)]
817
#[command(
918
author,
@@ -12,6 +21,7 @@ use crate::logging;
1221
after_help = "For help with a specific command, see: `air help <command>`."
1322
)]
1423
#[command(version)]
24+
#[command(styles = STYLES)]
1525
pub struct Args {
1626
#[command(subcommand)]
1727
pub(crate) command: Command,

0 commit comments

Comments
 (0)