cmd
cmd copied to clipboard
Support global flags with sub commands
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