Skip to content

Commit

Permalink
docs(example): update pseudo-flag example
Browse files Browse the repository at this point in the history
  • Loading branch information
rami3l committed Aug 1, 2021
1 parent 7f8f5cc commit cf94a5b
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions examples/05_flag_args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,7 @@ fn main() {
// Sometimes we might want to accept one of the following: `--pseudo-flag`, `--pseudo-flag=true`, `--pseudo-flag=false.`
// The following is the `pseudo-flag` pattern stated in https://github.com/clap-rs/clap/issues/1649#issuecomment-661274943
Arg::new("pseudo-flag") // Create a "pesudo-flag" with optional value
.possible_values(&["true", "false"]) // Limit that value to `true` of `false`
.long("pseudo-flag")
.min_values(0)
.max_values(1),
.possible_values(&["true", "false"]), // Limit that value to `true` of `false`
)
.arg("-c, --config=[FILE] 'sets a custom config file'")
.arg("<output> 'sets an output file'")
Expand Down

0 comments on commit cf94a5b

Please sign in to comment.