1 | use clap::Parser; |
---|---|
2 | |
3 | #[derive(Parser)] |
4 | #[command(name = "MyApp")] |
5 | #[command(author = "Kevin K. <kbknapp@gmail.com>")] |
6 | #[command(version = "1.0")] |
7 | #[command(about = "Does awesome things", long_about = None)] |
8 | struct Cli { |
9 | #[arg(long)] |
10 | two: String, |
11 | #[arg(long)] |
12 | one: String, |
13 | } |
14 | |
15 | fn main() { |
16 | let cli = Cli::parse(); |
17 | |
18 | println!("two: {:?}", cli.two); |
19 | println!("one: {:?}", cli.one); |
20 | } |
21 |