sade
sade copied to clipboard
feat: display subcommands as nested commands instead of as flat list of all commands
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 showcmd parent
as an available command. - Running
cmd parent --help
will only showcmd parent one
andcmd parent two
as available subcommands.
@lukeed What can you say about this? I'm interested in getting it into the master