bug-bash
[Top][All Lists]
Advanced

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

Re: [patch #10070] toggle invert flag when reading `!'


From: Chet Ramey
Subject: Re: [patch #10070] toggle invert flag when reading `!'
Date: Mon, 24 May 2021 11:47:32 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.10.2

On 5/22/21 2:45 PM, Vincent Menegaux wrote:

Details:

Previously, these commands:

   [[ ! 1 -eq 1 ]]; echo $?
   [[ ! ! 1 -eq 1 ]]; echo $?

would both result in `1', since parsing `!' set CMD_INVERT_RETURN
instead of toggling it.

Interestingly, ksh93 produces the same result as bash. I agree that it's
more intuitive to toggle it.

--
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/



reply via email to

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