Skip to content

HideHelpCommand issues #2129

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
2 of 3 tasks
dnbsd opened this issue May 11, 2025 · 0 comments
Open
2 of 3 tasks

HideHelpCommand issues #2129

dnbsd opened this issue May 11, 2025 · 0 comments
Labels
area/v3 relates to / is being considered for v3 kind/bug describes or fixes a bug status/triage maintainers still need to look into this

Comments

@dnbsd
Copy link

dnbsd commented May 11, 2025

My urfave/cli version is

v3.3.3

Checklist

  • Are you running the latest v3 release? The list of releases is here.
  • Did you check the manual for your release? The v3 manual is here
  • Did you perform a search about this problem? Here's the GitHub guide about searching.

Dependency Management

  • My project is using go modules.
  • My project is automatically downloading the latest version.

Describe the bug

I have noticed strange results produced by the default help template when my application is using HideHelpCommand:

Using HideHelpCommand in the root command and in a subcommand that has only one command (e.g. program config generate), the output is displayed without "COMMANDS" section.

https://go.dev/play/p/v7DRNLiVRzN

Using HideHelpCommand in the root only affects subcommands in the sense that "help" command is not shown in "COMMANDS" section, however the "help" command can still be invoked when it is specified as an argument.

https://go.dev/play/p/cGhEL-usWcW

To reproduce

I have attached Go playground links in the description.

Observed behavior

See the description.

Expected behavior

HideHelpCommand should hide help command from the usage output as well as disable the command when specified. Ideally, the behavior should be inherited from the parent command.

Additional context

None.

Want to fix this yourself?

We'd love to have more contributors on this project! If the fix for
this bug is easily explained and very small, feel free to create a
pull request for it.

Run go version and paste its output here

# paste `go version` output in here

Run go env and paste its output here

# paste `go env` output in here
@dnbsd dnbsd added kind/bug describes or fixes a bug status/triage maintainers still need to look into this area/v3 relates to / is being considered for v3 labels May 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/v3 relates to / is being considered for v3 kind/bug describes or fixes a bug status/triage maintainers still need to look into this
Projects
None yet
Development

No branches or pull requests

1 participant