Re: [RFH] convert shortlog to use parse_options

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

 



Pierre Habouzit <madcoder@xxxxxxxxxx> writes:

> On Fri, Dec 14, 2007 at 05:59:52AM +0000, Junio C Hamano wrote:
>> 	git cmd --abbrev=10 -n=4
>
>   actually -n=4 isn't understood atm, only -n4 and -n 4 are.

Ah, my mistake.  And I do not think accepting -n=4 is a good idea (it is
not historically done).

After thinking about it a bit more, I think I was worried too much about
burdening the users to remember the differences between options with,
without and optional option-arguments [*1*].  They need to know the
difference between options with and without option-arguments already
because single letter options can be combined if they are without
option-arguments, and they have to write "shortlog -new72" but not
"shortlog -wen72".  If they want to be extra sure, they can be more
explicit and say "shortlog -n -e -w72".

So let's go with the version you outlined --- options that take optional
option-arguments must get their option-arguments stuck to them, but
otherwise option-arguments can also be given as a separate word that
follows the option.

[Footnote]

*1* The fact some of our commands support options with optional
option-arguments is already against Guideline #7 in "12.2 Utility Syntax
Guidelines", so other POSIX guidelines are not useful for us in deciding
what behaviour to model after.
-
To unsubscribe from this list: 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]

  Powered by Linux