On Sun, Mar 29, 2020 at 7:29 PM Mikael Magnusson <mikachu@gmail.com> wrote:
> On 3/28/20, Roman Perepelitsa <roman.perepelitsa@gmail.com> wrote:
> > () {
> > emulate -L zsh -o pipe_fail -o err_return
> > false | while false; do; done
> > echo $?
> > }
> >
> > This prints "1". Is this expected? I was hoping for no output.
>
> FWIW, you can do this as a workaround
> [...]
I added `|| return` at the end. Works just as well and doesn't fork.
Is this behavior expected? I thought err_return should trigger
everywhere except for conditions under `if` and `while` and rhs of
`||` and `&&`. Are there additional rules that I'm missing?
Roman.