2021-11-30 18:30:19 +00:00
|
|
|
use clap::{AppSettings, Parser};
|
|
|
|
|
|
|
|
#[derive(Parser)]
|
2022-01-11 00:47:20 +00:00
|
|
|
#[clap(author, version, about, long_about = None)]
|
2022-02-10 17:51:40 +00:00
|
|
|
#[clap(allow_negative_numbers = true)]
|
2021-11-30 18:30:19 +00:00
|
|
|
#[clap(global_setting(AppSettings::DeriveDisplayOrder))]
|
|
|
|
struct Cli {
|
2022-05-21 00:52:04 +00:00
|
|
|
#[clap(long, value_parser)]
|
2021-11-30 18:30:19 +00:00
|
|
|
two: String,
|
2022-05-21 00:52:04 +00:00
|
|
|
#[clap(long, value_parser)]
|
2021-11-30 18:30:19 +00:00
|
|
|
one: String,
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let cli = Cli::parse();
|
|
|
|
|
|
|
|
println!("two: {:?}", cli.two);
|
|
|
|
println!("one: {:?}", cli.one);
|
|
|
|
}
|