Codeape Codeape - 2 months ago 12
Linux Question

Turn off abbreviation in getopt_long (optarg.h)?

Is it possible to turn off abbreviation in

? From the man page:

Long option names may be abbreviated if the abbreviation is unique or is an exact match for >some defined option.

I want to do this because the specification I have received for a piece of code requires full-length exact match of the flags, and there are many flags.



It appears there isn't a way to disable the abbreviation feature. You aren't alone in wishing for this feature. See:

Unfortunately, It seems the glibc developers don't want the option as the bug report linked above was resolved with "WONTFIX". You may be out of luck here :-\