Skip to content

[RFC] Add GNU getopt "interleaved options" mode

Thomas Flori requested to merge github/fork/diotteo/master into master

Created by: diotteo

Here is a set of commits which change the parsing from POSIX style (stop at the first non-argument or -- ) to GNU getopt style (interleaved options and operands).

I am not sure which is wanted. I know I prefer the GNU style (it's very useful for things like ./mytool -a opt1 -b opt2 operand1 operand2 -h, that is adding --help at the end as you are building your command-line string) , but maybe others prefer the POSIX style.

This will probably require some form of parsing-style option which I haven't implemented (yet).

Merge request reports