mirror of
https://github.com/clap-rs/clap
synced 2024-12-13 22:32:33 +00:00
9 lines
202 B
Rust
9 lines
202 B
Rust
use clap::{arg, command};
|
|
|
|
fn main() {
|
|
let matches = command!()
|
|
.arg(arg!(-n --name <NAME>).required(false))
|
|
.get_matches();
|
|
|
|
println!("name: {:?}", matches.value_of("name"));
|
|
}
|