Skip to content
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

feat: display subcommands as nested commands instead of as flat list of all commands #29

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

noamkfir
Copy link

When creating complex or deeply nested commands, the previous behavior displayed a long flat list of all the commands, including all the subcommands at all nested levels.

For example, consider a program with the following list of commands:

  • cmd
  • cmd parent
  • cmd parent one
  • cmd parent two

Running cmd --help would show the complete list, which is probably not the expected behavior, especially as the list of commands grows.

This PR changes the behavior so that only the next level of subcommands is displayed.

  • Running cmd --help will only show cmd parent as an available command.
  • Running cmd parent --help will only show cmd parent one and cmd parent two as available subcommands.

@tarsisexistence
Copy link

@lukeed What can you say about this?
I'm interested in getting it into the master

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.

2 participants