patchThe GNU Bourne-Again SHell - Patches: patch #10070, toggle invert flag when reading `!'


You are not allowed to post comments on this tracker with your current authentication level.

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

Submitter:  Vincent Menegaux <vimene>
Submitted:  Sat 22 May 2021 06:45:21 PM UTC
Category:  None Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  None Open/Closed:  Open

Mon 24 May 2021 03:56:03 PM UTC, comment #1: 

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

Chet Ramey <chet>
Group administrator
Sat 22 May 2021 06:45:21 PM UTC, original submission:  

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.

After this change,

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

result in `1', and

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

result in `0', which is the expected behavior.

Vincent Menegaux <vimene>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by chet (Posted a comment)
  • -email is unavailable- added by vimene (Submitted the item)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.


    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-05-24 chet StatusNone Done
    2021-05-22 vimene Attached File- Added 0001-toggle-invert-flag-when-reading.patch, #51462

    Back to the top

    Powered by Savane 3.13-b921.
    Corresponding source code