argtable / argtable3

A single-file, ANSI C, command-line parsing library that parses GNU-style command-line options.
http://www.argtable.org
Other
372 stars 65 forks source link

Argument "?" doesn't work #39

Closed unLomTrois closed 4 years ago

unLomTrois commented 5 years ago

I'm trying to run the following code: struct arg_lit *argHelp = arg_lit0("?", "help", "print this help and exit"); But argument "?" just isn't working.

progname -? progname: invalid option "-?"

With any other argument in place of "?" the code is working. Thus, the error is in "?".

tomghuang commented 4 years ago

The '?' character is a glob pattern that expands to an arbitrary character. It's a reserved character, so you should not use it as a command option name.