Debian Codegraph @

third_party/rust/clap/src/bin/stdio-fixture.rs

raw
1 fn 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 const STYLES: styling::Styles = styling::Styles::styled()
19 .header(styling::AnsiColor::Green.on_default().bold())
20 .usage(styling::AnsiColor::Green.on_default().bold())
21 .literal(styling::AnsiColor::Blue.on_default().bold())
22 .placeholder(styling::AnsiColor::Cyan.on_default());
23 cmd = cmd.styles(STYLES);
24 }
25 cmd.get_matches();
26 }