Re: [PATCH 1/6] gitopt: a new command-line option parser for git

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Eric Wong <normalperson@xxxxxxxx> wrote:

>  * unbundling of short options: -uC20n20z => -u -C20 -n20 -z

Does anyone ever use this?  I think this makes sense only for flags that
don't have parameters but that would create an ugly special case. Is it
too hard to type "-u -C=20 -n=20 -z"?

>  * optional argument handling (-C<num>, -M<num>)
>    -C <num> (with a space between them) has not changed,
>    however, <num> can be a sha1, or a path

IMO optional arguments are usually bad idea.

    -C 2 (is "2" argument?)
    -C2  (-C=2 or -C -2?)

Better to make it obvious there's an argument

    -C=2

or not support optional arguments at all and "-C 2" becomes unambiguous.

-- 
http://onion.dynserv.net/~timo/
-
: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]