Re:Maybe We Should Stop Creating Inscrutable CLIs
by big_chungus on Saturday August 17, 2019 @06:00PM
(#20726687)
In no small part this is because parsing long opts can be significantly more complicated than short ones. It is by contrast very easy to parse short, single-letter flags. Not saying it's not worth doing, but there is a reason this has not been standardized.
[ Parent
| on HN ]
Re:Maybe We Should Stop Creating Inscrutable CLIs
by dwheeler on Wednesday August 21, 2019 @05:16PM
(#20761917)
Parsing long opts is trivial; just determine if the string exactly matches. E.g., "--version" only matches "--version". Short opts is what takes slightly more effort, because you have to accept both "-ld" and "-l -d". We already handle the "hard" case, we just need to support the easy case.