Subject: Re: bug#23090: true and false not POSIX

From: Eric Blake <[email-masked]>
Date: Tue, 22 Mar 2016 12:00:55 -0600

On 03/22/2016 11:56 AM, Ruediger Meier wrote:

>> The man page (and --help output) specifically state:
>>
>>        NOTE: your shell may have its own version of true, which
>> usually super‐
>>        sedes the version described here.  Please refer to your 
>> shell's docu‐
>>        mentation for details about the options it supports.
> 
> I knew this note. However in the real world it simply does not make 
> sense to get a man page about something which is not used usually.

It's not coreutils' fault if distros don't know how to make 'man true'
redirect to the shell's man page.

> I suggest an enhancement for portability and implementation simplicity 
> to remove the options --version and --help from true, false echo and [.

Sorry, but that would violate GNU Coding Standards, so we aren't going
to do it.

> 
> It's a problem that the most used implementations (POSIX or built-ins) 
> behave differently and users might not be aware this fact when they use 
> the coreutils implementations by mistake or on purpose. Since the use 
> cases when somebody really needs a true, false or echo _binary_ are 
> rare, the probabilty is high that the user assumes well known behavior.

The probability that someone knows well-known GCS behavior of '--help'
working are also high.  At this point, the change would be more
disruptive than keeping the status quo.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org