Skip to content

Feature request: method to handle command exection #17

Description

@zefir-git

It would be nice if you could define a command handler directly on the Command instance, removing the need to use ProgramArgs and specify handling for everything there. That would allow sub-commands to be in their own modules and have their execution logic locally, rather than having everything in a single file.

For example:

new Command("foo", "bar")
    /**/
    .action((arguments, options) => {
        /**/
    });

Or subcommands could even be used as their own classes that extend Command.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions