main()1fn main() { 2 #[allow(unused_mut)] 3 let mut cmd = clap::Command::new("stdio-fixture") 4 .version("1.0") 5 .long_version("1.0 - a2132c") 6 .arg_required_else_help(true) 7 .subcommand(clap::Command::new("more")) 8 .arg( 9 clap::Arg::new("verbose") 10 .long("verbose") 11 .help("log") 12 .action(clap::ArgAction::SetTrue) 13 .long_help("more log"), 14 ); 15 #[cfg(feature = "color")] 16 { 17 use clap::builder::styling; 18 let styles = styling::Styles::styled() 19 .header(styling::AnsiColor::Green.on_default() | styling::Effects::BOLD) 20 .usage(styling::AnsiColor::Green.on_default() | styling::Effects::BOLD) 21 .literal(styling::AnsiColor::Blue.on_default() | styling::Effects::BOLD) 22 .placeholder(styling::AnsiColor::Cyan.on_default()); 23 cmd = cmd.styles(styles); 24 } 25 cmd.get_matches(); 26 } 27