[pacman-dev] Fix command line argument parsing in makepkg
Allan McRae
mcrae_allan at hotmail.com
Wed May 28 09:48:30 EDT 2008
Mark Constable wrote:
> On 2008-05-28, Xavier wrote:
>
>>> --source = -S
>>> --noconfirm = -n
>>> --noprogressbar = -N
>>> --holdver = -H
>>> --forcever = ?
>>> --asroot = ?
>>>
>
> Someone else suggested -0 and -F. The only extra I would
> suggest is an additional check for "--help" so for those
> occasions when longopts do get used, for assistance, that
> both -h and --help shows the new shortopts usage list.
>
I just did a grep though my history and I tend to always use long
options for --help and --version. So I am not so sure about a short
option only makepkg. I'd get used to it, but I expect all software to
have those long options. Also, I would find it a bit weird passing only
short options for --noprogressbar and --noconfirm which do not have
short options in pacman which is their eventual target.
I went back through the thread and looked at the reason for switching to
short options only and it seems the cleanest solution to the problem.
However, I just am not a fan of the idea. I really need to think on
this some more but I'd be in favour of a dirtier solution (perhaps the
addition of a specific option parser function) in order to keep them.
As already discovered, you can only go so far before the one letter
abbreviations become a bit obscure.
Allan
More information about the pacman-dev
mailing list