This is a rather hypothetical question, but let’s say I have 3 long parameters that begin with the same letter.
--parse or -p
--prune or -r
--pivot or -i
Eventually I’ll start running out of single letters that make sense, more over, it’s hard assign something meaningful in GNU getopt_long() configuration.
{"parase", no_argument, 0, 'p'},
{"prune", no_argument, 0, 'r'},
{"pivot", required_argument, 0, 'i'}
What is the best practice in these situations?
You have a choice of uppercase, as well as lowercase, giving you 52 short options, however many programs that accept long options don’t even bother assigning short options to some options, forcing the user to use the long options only, which OK.