address@hidden (Paul Jarc) wrote:
> Jim Meyering <address@hidden> wrote:
>> And if you build the GNU coreutils on a system that conforms to
>> POSIX 1003.1-2001, then you'll find that the above all fail, e.g. like this:
>>
>> $ head -1
>> head: `-1' option is obsolete; use `-n 1'
>> Try `head --help' for more information.
>> [Exit 1]
>
> Given the significant number of complaints about this behavior, I
> think it would make sense to reject -1, etc., only if $POSIXLY_CORRECT
> is set.
Sorry, but I don't want to do that.
Most (all?) uses of POSIXLY_CORRECT in the coreutils
are for nit-picky details (like whether --help/--version
are accepted, or whether tr gives a pedantic warning in a corner case),
and not for important changes in functionality.
My philosophy has been that people are welcome to enable POSIXLY_CORRECT,
but few should want to, because doing so disables useful behavior.
These changes are in a different class, so I think it's best to
associate them with a different variable: $_POSIX2_VERSION.
Jim