Skip to content

Support global flags with sub commands #9

@jecxjo

Description

@jecxjo

The one layout that seems to be missing is the ability to set global flags and then use sub commands:

$ foo usage
Usage: foo [options] <sub command> [<sub args>]
$ foo --logfile /tmp/log.txt subcommand --sub-flag-enabled

I think it would be useful to be able to merge a cmd/def with a cmd/group in a way to get the [options] <sub cmd> [<sub opts>]. Especially if you are looking to alias command line apps. Have the alias mask the default options being over written, e.g. alias t=todo -t ~/.todo/todo.txt

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