Order between options and arguments is significant (-f and -g must appear before the SRC argument)
So I don't see how to specify a command like rm -fr DIR, where the option-to-argument ordering is not significant, and rm -fr DIR, rm -r DIR -f, rm -f DIR -r, rm DIR -fr are all acceptable and equivalent
Basically, one of my commands has generic options like -q | --quiet that do not require any special position on the command line.
The canonical way to write the command is
something sub [options] ORDERED_ARGS
But it is very common for users to backtrack in shell history, and that will position the cursor to the end of the command line, so they'd like to add/remove -q and other generic things there without having to move to a specific point in the command line.
I suppose I could specify the same optional option group before, between and after each argument, but that becomes mightily verbose and unreadable in --help, and you lose the possibility to specify inter-option constrains like “verbose and silent are incompatible, use at most one of them”
This is not a huge issue, just an annoyance
Right now the documentation states
So I don't see how to specify a command like
rm -fr DIR
, where the option-to-argument ordering is not significant, andrm -fr DIR
,rm -r DIR -f
,rm -f DIR -r
,rm DIR -fr
are all acceptable and equivalentBasically, one of my commands has generic options like
-q | --quiet
that do not require any special position on the command line.The canonical way to write the command is
But it is very common for users to backtrack in shell history, and that will position the cursor to the end of the command line, so they'd like to add/remove
-q
and other generic things there without having to move to a specific point in the command line.I suppose I could specify the same optional option group before, between and after each argument, but that becomes mightily verbose and unreadable in
--help
, and you lose the possibility to specify inter-option constrains like “verbose and silent are incompatible, use at most one of them”