Long names with short option

Jan 25, 2011 at 8:16 AM
Edited Jan 25, 2011 at 8:37 AM

Basically I want to use long names with only one -, not two, since long names require two --'s

-verbose, instead of --verbose

Advice on whether to just remove the length check, or whether to add a whole new attribute (sounds non-trivial to do) is advised.

(edit) Looks like the length check (number of hypens) is hard-coded into the parser logic in too many places to me to figure out how to change it, ...I need to have this behaviour for backward compatibility

May 14, 2012 at 9:36 PM

If you design a new tool, why not follow GNU options conventions...?

Everything can be done, but when you use reusable code you can meet a little compromise in favor of getting a very well tested and stable code.

Am I wrong?



Aug 14, 2013 at 9:55 PM
It's not that you are wrong, but sometimes you are limited by someone else's code that you have to deal with when you need backwards compatibility.