From f7c2deaa476e74f801bb080fc9de018cec8f43a2 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Thu, 5 May 2022 12:14:46 -0500 Subject: [PATCH] fix(help): Don't show hidden arguments for conflicts This makes it consistent with other errors where we show arguments to the user. --- src/parse/validator.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/parse/validator.rs b/src/parse/validator.rs index 5d03811d830..92702af6a9a 100644 --- a/src/parse/validator.rs +++ b/src/parse/validator.rs @@ -290,6 +290,10 @@ impl<'help, 'cmd> Validator<'help, 'cmd> { let used_filtered: Vec = 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();