Add an optional "group" to a command.
You don't yet have a lot of organization control for commands. They are listed in alphabetical order (for some reason) instead of in the order in which they appear in the file. Having a list of commands grouped together is already somewhat possible via imports: <some-other-ahoy.yml>. There is a carot/arrow shown on items that have sub-commands in this way, but you can't see them right away where the commands are organized.
I'm thinking if you add "group" as an option to a command, then that would either allow for subcommand like functionality without the need to have a separate file, and we could format things by group name. There's still more to sort out there so ideas and feedback welcome.
Here's an example:
ahoyapi: v2
commands:
test:
group: stuff
cmd: echo "TEST"
usage: test
then ahoy --help output would be:
...
COMMANDS:
[stuff]
test: ...
and calling it would be like calling an import
ahoy stuff test
Alternatively, the group could be visual only so simply ahoy test still.
I certainly like this idea for visual organisation of the commands @frankcarey.
I wonder if making it behave like an imported set of commands, by having to call it as ahoy <group> <command> might be a bit confusing for people though?
An improvement we could make as part of this might also be to always list the commands (i.e. when you run just plain ahoy) in the order in which they were parsed from the various config files. Then the groups could be displayed nicely along with the ungrouped commands, perhaps top level/ungrouped ones first, then grouped and imported commands, with explanatory subheadings for each group, showing why they're ordered in this way.