Skip to content

Allow parent command options to be parsed in sub-commands #40

Open
@mwatts15

Description

@mwatts15

The cli_command_wrapper module allows for making the command interface (i.e., OWM and sub-commands) accessible through a command line interface. This interface presents attributes and parameters as command line options, but requires that options which are defined by a "super-command" to precede the introduction of any sub-command. This is, sometimes, inconvenient since we may realize the need for a super-command's options only after we've typed out most of the command, so we have to navigate back to the earlier command to add the options.

Method parameters from super-commands' __call__ methods should not be available on sub-commands under this proposal: this allows to segregate options that only make sense for specific methods from those that are potentially applicable throughout sub-commands.

Recommended approach: define parsers just for options derived from properties and attributes to pass down to the current parser and any sub-parsers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions