coreutils
[Top][All Lists]
Advanced

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

Re: [PATCH] doc: The test "==" operator is a GNU extension.


From: Pádraig Brady
Subject: Re: [PATCH] doc: The test "==" operator is a GNU extension.
Date: Thu, 12 Nov 2020 18:56:19 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:83.0) Gecko/20100101 Thunderbird/83.0

On 12/11/2020 18:23, Eric Blake wrote:
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.

Right we'll leave POSIX out of the description so.

thanks!



reply via email to

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