emacs-bug-tracker
[Top][All Lists]
Advanced

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

[debbugs-tracker] bug#33468: closed (A bug with yes and --help)


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#33468: closed (A bug with yes and --help)
Date: Mon, 25 Feb 2019 07:30:02 +0000

Your message dated Mon, 25 Feb 2019 08:29:08 +0100
with message-id <address@hidden>
and subject line Re: bug#33468: A bug with yes and --help
has caused the debbugs.gnu.org bug report #33468,
regarding A bug with yes and --help
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
33468: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=33468
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: A bug with yes and --help Date: Thu, 22 Nov 2018 20:09:35 +0200 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.1
So I was messing around with `yes`, and after running `yes --help me` it
output this:

> yes: unrecognized option '--help'
> Try 'yes --help' for more information.

After a bit of more testing of this, I found the same reaction from
`whoami`.  I believe this might be because both `yes` and `whoami` only
ever accept one option -- that being `--help` or `--version`, and it
says that it doesn't know what `--version` is when run with an extra
operand as well.  However, `true` or `false` doesn't give a textual
error, but they completely ignore the option:

> $ /usr/bin/true --version
> true (GNU coreutils) 8.30
> Copyright (C) 2018 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later
<https://gnu.org/licenses/gpl.html>.
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.
>
> Written by Jim Meyering.
> $ /usr/bin/true --version asd
> $ echo $?
> 0

Suggested possible fixes:
1.  A more general error message, e.g., `yes` only accepts one option or
none.
2.  Ignore the stuff that follows the option, making `yes --help me` act
the same as `yes --help`, which kind of matches with other shell
commands in that they print help, ignore the rest of arguments and exit.
3.  Ignore the option: `yes --help me` would use "--help me" as the
string to repeat.

The third one isn't really a good one, but it exists as an idea so I'm
marking it down.

----
Uko Kokņevičs (Uko Koknevics)




--- End Message ---
--- Begin Message --- Subject: Re: bug#33468: A bug with yes and --help Date: Mon, 25 Feb 2019 08:29:08 +0100 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.0
On 2/22/19 8:50 PM, Bernhard Voelker wrote:
> So the latest patch set [*] is good to push?

Padraig pushed the gnulib change at:
  https://git.sv.gnu.org/cgit/gnulib.git/commit/?id=e3970fb989
and sync'd coreutils to that commit.

I pushed the CU change on top at:
https://git.sv.gnu.org/cgit/coreutils.git/commit/?id=44af8426

Marking this as done.

Thanks for all the "--help"-ful discussion. ;-)

Have a nice day,
Berny


--- End Message ---

reply via email to

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