I have found that there is an error in the implementation of the negation statement. Zsh currently fails to print "done" for the following code:

set -e
fn() { true; }
! fn
echo done $?

Fixing the negation statement allows a slightly simpler fix for function calls. Instead of my original patch, I recommend submitting the 4 patches attached here.

Philippe



On Wed, Nov 16, 2022 at 3:40 PM Philippe Altherr <philippe.altherr@gmail.com> wrote:
The attached patch fixes the ERR_EXIT behavior in function calls and "always" statements. The patch does the following:
Philippe