Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces the ability for apps using Commander to define command groups/subcommands.
Overview
The syntax for groups is similar to how one would define a command. A group is given a name, a syntax string, and optionally a summary/description. Groups are displayed at the top-level help dialog alongside ungrouped commands (grouped commands are no longer shown in the top-level help dialog). Each group has its own help dialog describing the subcommands within that group, which is shown when the user enters the group name without specifying a subcommand.
In-practise
The following block will define:
files
; with:The default
help
dialog for the above would resemble the following:With the
help
dialog forfiles
resembling the following:Future enhancements
Currently, we only allow single-level groups; as in, a group can only contain subcommands. In the future, it may be useful to implement group nesting.