Skip to content

Commit

Permalink
fix(help): Don't show hidden arguments for conflicts
Browse files Browse the repository at this point in the history
This makes it consistent with other errors where we show arguments to
the user.
  • Loading branch information
epage committed May 5, 2022
1 parent dedbabd commit f7c2dea
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/parse/validator.rs
Expand Up @@ -290,6 +290,10 @@ impl<'help, 'cmd> Validator<'help, 'cmd> {
let used_filtered: Vec<Id> = matcher
.arg_names()
.filter(|arg_id| matcher.check_explicit(arg_id, ArgPredicate::IsPresent))
.filter(|n| {
// Filter out the args we don't want to specify.
self.cmd.find(n).map_or(true, |a| !a.is_hide_set())
})
.filter(|key| !conflicting_keys.contains(key))
.cloned()
.collect();
Expand Down

0 comments on commit f7c2dea

Please sign in to comment.