mirror of
https://github.com/clap-rs/clap
synced 2025-03-04 15:27:16 +00:00
fix(help): Don't report flag defaults
Now that flags can have meaningful defaults and with defaults being implicitly set for certain actions, they appear in help but don't quite make sense.
This commit is contained in:
parent
11fbe7e54b
commit
a3092bafce
1 changed files with 1 additions and 1 deletions
|
@ -601,7 +601,7 @@ impl<'help, 'cmd, 'writer> Help<'help, 'cmd, 'writer> {
|
|||
spec_vals.push(env_info);
|
||||
}
|
||||
}
|
||||
if !a.is_hide_default_value_set() && !a.default_vals.is_empty() {
|
||||
if a.is_takes_value_set() && !a.is_hide_default_value_set() && !a.default_vals.is_empty() {
|
||||
debug!(
|
||||
"Help::spec_vals: Found default value...[{:?}]",
|
||||
a.default_vals
|
||||
|
|
Loading…
Add table
Reference in a new issue