sade icon indicating copy to clipboard operation
sade copied to clipboard

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

Open noamkfir opened this issue 5 years ago • 1 comments

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.

noamkfir avatar Jul 29 '19 03:07 noamkfir

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

tarsisexistence avatar Apr 10 '20 07:04 tarsisexistence