diff --git a/NEWS b/NEWS index cdafd1ff5..877a5550b 100644 --- a/NEWS +++ b/NEWS @@ -4,6 +4,26 @@ CHANGES FROM PREVIOUS VERSIONS OF ZSH Note also the list of incompatibilities in the README file. +Changes since 5.9 +----------------- + +Fixed several bugs in the implementation of ERR_EXIT. When ERR_EXIT is +enabled, when any command fails the shell immediately exits, except if +ERR_EXIT was being suppressed for that command. ERR_EXIT is suppressed +for commands on the left of && and ||, on the right of !, and in the +condition of if, while, and until. ERR_EXIT is also suppressed in any +structured command (if, for, while, until, repeat, case, select, +always, or a list in braces) whose exit status is the result of a +failure while ERR_EXIT was being suppressed. Thus, neither "false && +true" nor "if true; then false && true; fi" cause an immediate exit. +However, if these expressions are the body of a function, then a call +to that function must cause an exit. Until now, Zsh failed to do so +for the latter. Similarly, it failed to exit if that expression was +the argument of an eval command or the body of a sourced script. +Until now, Zsh also failed to suppress ERR_EXIT for negated function +calls and for always statements. Thus, "func() { true }; ! func" and +"{ false && true } always { true }" incorrectly caused an exit. + Changes since 5.8.1 -------------------