catchorg / Clara

A simple to use, composable, command line parser for C++ 11 and beyond
Boost Software License 1.0
648 stars 67 forks source link

for Windows style parsing, allow multi-character option names #69

Open ThirtyNineWinks opened 6 years ago

ThirtyNineWinks commented 6 years ago

On windows it is common to have multi-character option names, without needing a different way to start the option. For example: "/test". The current parser accepts the leading '/' on the option, but then it sees that it is multiple characters without a second '-', so it breaks it up into: -t -e -s -t.

I'd like a way to say "do this 'windows style', and don't require "--" to start multiple-character option names.

(I have "fixed" this in my program by looking for this case and putting in the second '-', but it's a hack. I have to put both "/test" and "/-test" as equivalent names for the option, else it won't match.)

(I have no need for composing options in one option string, unlike: ls -lrt)