Skip to content

Make COMMAND subcommand parameter required? #625

@sebthom

Description

@sebthom

Currently when I have a main command with subcommands, the help is rendered like this:

Usage: mycommand [-hqV] [-v]... [COMMAND]

Where the brackets around [COMMAND] signal that the command parameter is optional.
I need it to be required, i.e. the call()/run() method of the main command actually is not used.

Right now I throw an exception inside the call()/run() method and advice the user to specify a command. However I would prefer this to be a declarative setting, also I would like to see the usage help signal the COMMAND parameter as required.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions