Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Yet another errexit bug?



I thought we'd squashed all of these, but:

% ! ( setopt errexit; false; print notreached )
notreached
% print $?
1

Compare bash:

$ ! ( set -e; false; echo notreached; )
$ echo $?
0

Zsh still leaking "noerrexit" into subshells, I guess?

Curiously however, bash (5.0.17):

$ ( set -e; false; echo notreached; ) && echo here
notreached
here

So bash is treating a subshell in AND/OR as different than subshell
preceded by NOT?  Zsh matches bash in the AND case, so maybe zsh's NOT
behavior is actually more consistent?




Messages sorted by: Reverse Date, Date, Thread, Author