Skip to content

fix: inherit HideHelpCommand in subcommands - #2395

Open
utkarshalpha wants to merge 1 commit into
urfave:mainfrom
utkarshalpha:fix/hide-help-command-inheritance
Open

fix: inherit HideHelpCommand in subcommands#2395
utkarshalpha wants to merge 1 commit into
urfave:mainfrom
utkarshalpha:fix/hide-help-command-inheritance

Conversation

@utkarshalpha

Copy link
Copy Markdown

What type of PR is this?

  • bug

What this PR does / why we need it:

  • Makes HideHelpCommand inherit through the command hierarchy, matching the existing behavior of HideHelp.
  • Prevents nested commands from re-adding the built-in help command when an ancestor disabled it.
  • Extends the existing test through two nested command levels while confirming --help remains available.

Which issue(s) this PR fixes:

Fixes #2129

Testing

  • go test ./... -count=1
  • go run scripts/build.go generate
  • go run scripts/build.go vet
  • go run scripts/build.go check-binary-size
  • go run scripts/build.go gfmrun

Release Notes

Make HideHelpCommand apply to nested subcommands.

@utkarshalpha
utkarshalpha requested a review from a team as a code owner July 26, 2026 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

HideHelpCommand issues

1 participant