bug-coreutils
[Top][All Lists]
Advanced

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

bug#20514: Patch to tie --help and --version behavior to POSIXLY_CORRECT


From: Pádraig Brady
Subject: bug#20514: Patch to tie --help and --version behavior to POSIXLY_CORRECT
Date: Wed, 06 May 2015 17:16:53 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0

On 06/05/15 16:40, Shawn McMahon wrote:
> The following patch to "test" ties the behavior of "--help" and "--version" 
> to POSIXLY_CORRECT. I don't believe this breaks anything, and if it does it 
> can by fixed by setting the time-honored variable. This will solve the 
> problem of users occasionally being confused by this behavior, which has 
> happened even recently to coreutils developers. See for example:
> 
> http://lists.gnu.org/archive/html/coreutils/2015-03/msg00007.html

Your patch logic is confusing me.
I presume you mean to have `test --help` output usage by default?
If so I'm not sure it's appropriate to change that.
Consider a script like the following, which would spuriously output the version.

  option='--version'
  test "$option" || { usage; exit 1; }
  cmd $option

thanks,
Pádraig





reply via email to

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