On 11/12/20 12:07 PM, Pádraig Brady wrote:
> On 12/11/2020 17:17, Ben Pfaff wrote:
>> * doc/coreutils.texi (test invocation): Mark the "==" operator as a GNU
>> extension, to reduce the number of people who accidentally use it while
>> thinking it's portable.
>> ---
>>   doc/coreutils.texi | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/doc/coreutils.texi b/doc/coreutils.texi
>> index 8d9320ca2..601b06300 100644
>> --- a/doc/coreutils.texi
>> +++ b/doc/coreutils.texi
>> @@ -13336,6 +13336,7 @@ True if the strings are equal.
>>   @opindex ==
>>   @cindex equal string check
>>   True if the strings are equal (synonym for =).
>> +This form is a GNU extension.
>>     @item @var{string1} != @var{string2}
>>   @opindex !=
>>
> 
> Well it's not GNU specific.
> Also I think it's proposed in POSIX, Eric?

The proposal has been floated before, but at the present, the current
thinking is that it is saner standardizing '[[' than it is to retrofit
'==' into '[', but even that is an uphill battle:

https://www.austingroupbugs.net/view.php?id=375

> I agree that we should mention its lack of portability though.

Concur.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org


Reply via email to