Skip to content

Add an optional "group" to a command. #151

@frankcarey

Description

@frankcarey

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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions