cmd icon indicating copy to clipboard operation
cmd copied to clipboard

Support global flags with sub commands

Open jecxjo opened this issue 8 months ago • 0 comments

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

jecxjo avatar Jun 20 '25 19:06 jecxjo