You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ cargo run -- --help Compiling clap-value-parser-takes-value v0.1.0 (/home/umcdev/src/bug-reproduction/clap-value-parser-takes-value) Finished dev [unoptimized + debuginfo] target(s) in 0.91s Running `target/debug/clap-value-parser-takes-value --help`cmdUSAGE: clap-value-parser-takes-value [OPTIONS]OPTIONS: -d, --digest choose digest -h, --help Print help information
$ cargo run -- --digest md5 Finished dev [unoptimized + debuginfo] target(s) in 0.02s Running `target/debug/clap-value-parser-takes-value --digest md5`error: Found argument 'md5' which wasn't expected, or isn't valid in this contextUSAGE: clap-value-parser-takes-value [OPTIONS]For more information try --help
Actual Behaviour
Arg::value_parse does not implicitly set Arg::takes_value.
Expected Behaviour
A lot of functions, e.g. Arg::value_name set Arg::takes_value(true) that I expected Arg::value_parser to do the same.
Additional Context
I consider this to be an inconsistency, it does not follow the principle of least surprise.
Debug Output
not required.
The text was updated successfully, but these errors were encountered:
Please complete the following tasks
Rust Version
rustc 1.63.0 (4b91a6ea7 2022-08-08)
Clap Version
3.2.17
Minimal reproducible code
Steps to reproduce the bug with the above code
Actual Behaviour
Arg::value_parse
does not implicitly setArg::takes_value
.Expected Behaviour
A lot of functions, e.g.
Arg::value_name
setArg::takes_value(true)
that I expectedArg::value_parser
to do the same.Additional Context
I consider this to be an inconsistency, it does not follow the principle of least surprise.
Debug Output
not required.
The text was updated successfully, but these errors were encountered: