2021-11-30 18:30:19 +00:00
|
|
|
use clap::Parser;
|
|
|
|
|
|
|
|
#[derive(Parser)]
|
2022-09-02 20:37:23 +00:00
|
|
|
#[command(name = "MyApp")]
|
|
|
|
#[command(author = "Kevin K. <kbknapp@gmail.com>")]
|
|
|
|
#[command(version = "1.0")]
|
|
|
|
#[command(about = "Does awesome things", long_about = None)]
|
2021-11-30 18:30:19 +00:00
|
|
|
struct Cli {
|
2022-09-02 20:37:23 +00:00
|
|
|
#[arg(long)]
|
2021-11-30 18:30:19 +00:00
|
|
|
two: String,
|
2022-09-02 20:37:23 +00:00
|
|
|
#[arg(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);
|
|
|
|
}
|