| 1 | use clap::{command, Arg}; |
|---|---|
| 2 | |
| 3 | fn main() { |
| 4 | let matches = command!() // requires `cargo` feature |
| 5 | .arg(Arg::new("name").short( 'n').long( "name")) |
| 6 | .get_matches(); |
| 7 | |
| 8 | println!("name: {:?}", matches.get_one::<String>( "name")); |
| 9 | } |
| 10 |
