bug-hello
[Top][All Lists]
Advanced

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

Re: [PATCH 2/2] hello: remove -h and -v short options


From: Jim Meyering
Subject: Re: [PATCH 2/2] hello: remove -h and -v short options
Date: Sat, 3 Jan 2015 14:17:07 -0800

On Sat, Jan 3, 2015 at 6:06 AM, Benno Schulenberg
<address@hidden> wrote:
>
> On 2015-01-01 14:33, Sami Kerola wrote:
>> * src/hello.c: Remove -h and -v options, and leave --help and --version
>>   as they were.
>
> Ouch, ouch, ouch!
>
> Maybe the GNU standards say nothing about short options, but it
> is *so* much a custom for command-line tools to recognize -h and
> -V for --help and --version, that I don't think it is a good idea
> to show as an example-to-be-imitated these two long options without
> any corresponding short options.  You may wish to poke some GNU
> people about this directly.  Karl Berry?  Eric Blake?  Maybe
> mister Stallman himself?
>
> Also, if you remove -h and -v, why not also remove -g and -t?
>
> Long options are nice for scripts, for clarity, so commands don't
> need comments.  Short options are great (nearly essential) for
> typing things on the command line.

IMHO, it's not that bad.
Sometimes, you can get the same effect with --h and --v.
That works when those abbreviated options are unambiguous,
so would fail if there is a --verbose option or any other
long-named option whose name starts with "v".

It's probably worthwhile to leave some options as
long-name-only and others with both short and long names,
so people can see how to implement the two approaches.
Besides, in many cases, we omit the short-named
options to avoid potential for conflict with other-vendor
versions of the same tool.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]