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
{{ message }}
Repository navigation
test: add shell-completion case for hidden BoolWithInverseFlag #2405
PR #2388 changed printFlagSuggestions in help.go to skip flags via the VisibleFlag/IsVisible() interface instead of the previous flag.(*BoolFlag) assertion. The previous check only skipped hidden bool flags, and because the *BoolFlag assertion does not match the *BoolWithInverseFlag concrete type, hidden BoolWithInverseFlags were also leaked into shell completion suggestions.
That leak is now fixed by the interface-based check, but the regression test table in TestDefaultCompleteWithFlags only covers the BoolFlag (hidden-bool) and StringFlag (new in #2388) cases.
Proposed change
Add a BoolWithInverseFlag case to the TestDefaultCompleteWithFlags table (e.g. a hidden --excellentBoolWithInverseFlag) to lock in the fix for this type too.
Activity