xref: /aosp_15_r20/external/cronet/third_party/rust/chromium_crates_io/vendor/clap-4.5.4/src/bin/stdio-fixture.rs (revision 6777b5387eb2ff775bb5750e3f5d96f37fb7352b)

main()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         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