cxxopts icon indicating copy to clipboard operation
cxxopts copied to clipboard

Allow ? in (short) option name

Open tom42 opened this issue 4 years ago • 1 comments

Hello,

I was trying to mimick a parser built with glibc's argp. argp's built in help option can be invoked with either the -? or the --help option.

When I write the following, I get an exception ("Invalid option format '?,help'")

options.add_options("")("?,help", "Print this help")

Would it be possible to allow the ? character, at least for short option names?

Regards Thomas

tom42 avatar Jan 04 '21 13:01 tom42

That should be pretty straight forward. I can't see why that can't be a valid character.

jarro2783 avatar Jan 05 '21 06:01 jarro2783