clap/examples/tutorial_builder/03_03_positional.rs

10 lines
211 B
Rust
Raw Normal View History

// Note: this requires the `cargo` feature
2022-02-15 14:33:38 +00:00
use clap::{arg, command};
fn main() {
2022-02-15 14:33:38 +00:00
let matches = command!().arg(arg!([NAME])).get_matches();
println!("NAME: {:?}", matches.get_one::<String>("NAME"));
}