2021-11-30 18:30:19 +00:00
|
|
|
use clap::Parser;
|
|
|
|
|
|
|
|
#[derive(Parser)]
|
|
|
|
#[clap(name = "MyApp")]
|
|
|
|
#[clap(author = "Kevin K. <kbknapp@gmail.com>")]
|
|
|
|
#[clap(version = "1.0")]
|
2022-01-11 00:47:20 +00:00
|
|
|
#[clap(about = "Does awesome things", long_about = None)]
|
2021-11-30 18:30:19 +00:00
|
|
|
struct Cli {
|
2022-07-23 00:36:26 +00:00
|
|
|
#[clap(long)]
|
2021-11-30 18:30:19 +00:00
|
|
|
two: String,
|
2022-07-23 00:36:26 +00:00
|
|
|
#[clap(long)]
|
2021-11-30 18:30:19 +00:00
|
|
|
one: String,
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let cli = Cli::parse();
|
|
|
|
|
|
|
|
println!("two: {:?}", cli.two);
|
|
|
|
println!("one: {:?}", cli.one);
|
|
|
|
}
|