[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.
- [PATCH 0/2] usage translation and option changes, Sami Kerola, 2015/01/01
- [PATCH 2/2] hello: remove -h and -v short options, Sami Kerola, 2015/01/01
- Re: [PATCH 2/2] hello: remove -h and -v short options, Benno Schulenberg, 2015/01/03
- Re: [PATCH 2/2] hello: remove -h and -v short options, Reuben Thomas, 2015/01/03
- Re: [PATCH 2/2] hello: remove -h and -v short options, Benno Schulenberg, 2015/01/04
- Re: [PATCH 2/2] hello: remove -h and -v short options, Sami Kerola, 2015/01/04
- Re: [PATCH 2/2] hello: remove -h and -v short options, Reuben Thomas, 2015/01/04
- Re: [PATCH 2/2] hello: remove -h and -v short options, Benno Schulenberg, 2015/01/04
- Re: [PATCH 2/2] hello: remove -h and -v short options,
Jim Meyering <=
[PATCH 1/2] hello: slice print_help() lines and add Translation Project address, Sami Kerola, 2015/01/01