mirror of
https://github.com/clap-rs/clap
synced 2025-03-04 15:27:16 +00:00
docs(tutorial): Use arg!s action selection
This commit is contained in:
parent
f3d4c2c971
commit
571e3a5e15
1 changed files with 3 additions and 6 deletions
|
@ -13,12 +13,9 @@ fn main() {
|
||||||
.required(false)
|
.required(false)
|
||||||
.value_parser(value_parser!(PathBuf)),
|
.value_parser(value_parser!(PathBuf)),
|
||||||
)
|
)
|
||||||
.arg(
|
.arg(arg!(
|
||||||
arg!(
|
-d --debug ... "Turn debugging information on"
|
||||||
-d --debug "Turn debugging information on"
|
))
|
||||||
)
|
|
||||||
.action(ArgAction::Count),
|
|
||||||
)
|
|
||||||
.subcommand(
|
.subcommand(
|
||||||
Command::new("test")
|
Command::new("test")
|
||||||
.about("does testing things")
|
.about("does testing things")
|
||||||
|
|
Loading…
Add table
Reference in a new issue