[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#23090: true and false not POSIX
From: |
Eric Blake |
Subject: |
bug#23090: true and false not POSIX |
Date: |
Tue, 22 Mar 2016 09:27:07 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 |
On 03/22/2016 09:08 AM, Stephane Chazelas wrote:
>> BTW I know about POSIXLY_CORRECT env. I just ask this: Is it worth to
>> violate parts of POSIX just for minor cosmetical reasons?
>>
>> I mean echo -n/-e may be an improvement though non-posix. But
>> echo --version is a violation just for cosmetics, true --version is
>> even worse.
>
> AFAICT, echo --version is a violation, true --version is not.
'echo --version' is not a violation. POSIX says that you are allowed to
require the user to set a particular environment variable to enter the
POSIX-conformant setup; in GNU coreutils' case, that variable is
POSIXLY_CORRECT. When set, coreutils' echo behaves exactly as POSIX
requires. When not set, coreutils' echo behaves as GNU Coding Standards
require. As the two standards conflict, we cannot do both behaviors at
once; so the behavior of choice is determined by your environment variables.
In the case of 'true' and 'false', the two standards do not conflict, so
we implement both of them at once without the need to resort to reading
POSIXLY_CORRECT from the environment.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- bug#23090: true and false not POSIX, Ruediger Meier, 2016/03/22
- bug#23090: true and false not POSIX, Stephane Chazelas, 2016/03/22
- bug#23090: true and false not POSIX, Ruediger Meier, 2016/03/22
- bug#23090: true and false not POSIX, Stephane Chazelas, 2016/03/22
- bug#23090: true and false not POSIX,
Eric Blake <=
- bug#23090: true and false not POSIX, Ruediger Meier, 2016/03/22
- bug#23090: true and false not POSIX, Paul Eggert, 2016/03/22
- bug#23090: true and false not POSIX, Stephane CHAZELAS, 2016/03/22
- bug#23090: true and false not POSIX, Ruediger Meier, 2016/03/22
- bug#23090: true and false not POSIX, Eric Blake, 2016/03/22
bug#23090: true and false not POSIX, Eric Blake, 2016/03/22