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: felix
Subject: Re: [patch #10070] toggle invert flag when reading `!'
Date: Wed, 26 May 2021 08:14:29 +0200
User-agent: Mutt/1.10.1 (2018-07-13)

On Mon, May 24, 2021 at 11:47:32AM -0400, Chet Ramey wrote:
> 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.

I will try this as:

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



-- 
 FĂ©lix Hauri  -  <felix@f-hauri.ch>  -  http://www.f-hauri.ch



reply via email to

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