clap/tests/derive_ui/bool_arg_enum.rs

14 lines
198 B
Rust
Raw Normal View History

use clap::Parser;
2020-04-22 07:25:41 +00:00
#[derive(Parser, Debug)]
2020-04-22 07:25:41 +00:00
#[clap(name = "basic")]
struct Opt {
#[clap(short, arg_enum)]
opts: bool,
}
fn main() {
let opt = Opt::parse();
println!("{:?}", opt);
}