bug-gnulib
[Top][All Lists]
Advanced

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

Re: another hello pretest


From: Eric Blake
Subject: Re: another hello pretest
Date: Mon, 16 Oct 2006 14:49:03 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Bruce Korb <bruce.korb <at> gmail.com> writes:

> 
> On 10/16/06, Eric Blake <ebb9 <at> byu.net> wrote:
> > You need to make sure that 'hello --help --version' is different than
> > `hello --version --help'; right now, --help always wins.
> 
> As one would rightly expect.  You want to be able to append ``--help''
> to what you've
> typed so far, see the help, and re-edit your last command by removing the
> ``--help'' and adding what you couldn't remember.  Always doing help
> is correct.  :)

Not according to the GNU Coding Standards:
http://www.gnu.org/prep/standards/standards.html#Command_002dLine-Interfaces

"--version
This option should direct the program to print information about its name, 
version, origin and legal status, all on standard output, and then exit 
successfully. Other options and arguments should be ignored once this is seen, 
and the program should not perform its normal function."

In other words, typing --help after --version is too late; parsing --version 
should quit the parser.

And for precedence, none of the coreutils behave in the manner of hello 2.1.93; 
they all treat whichever option of --version or --help that appeared first as 
the winning option.

-- 
Eric Blake






reply via email to

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