mirror of
https://github.com/clap-rs/clap
synced 2025-01-05 17:28:42 +00:00
9e38353442
We aren't enumerating arguments but values for an argument, so the name should reflect that. This will be important as part of #1807 when we have more specific attribute names.
13 lines
200 B
Rust
13 lines
200 B
Rust
use clap::Parser;
|
|
|
|
#[derive(Parser, Debug)]
|
|
#[clap(name = "basic")]
|
|
struct Opt {
|
|
#[clap(short, value_enum)]
|
|
opts: bool,
|
|
}
|
|
|
|
fn main() {
|
|
let opt = Opt::parse();
|
|
println!("{:?}", opt);
|
|
}
|