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

Re: [PATCH] More ERR_EXIT (was Re: Tests RE behavior of ERR_EXIT)



On Sun, Nov 13, 2022 at 12:56 PM Philippe Altherr
<philippe.altherr@xxxxxxxxx> wrote:
>
> Here is one thing that could explain why the "where" [sic] statement is an outlier (at least compared to the other compound commands that I have tested so far). It's the only case where after evaluating "false && true" you have to first evaluate a whole other command, the loop condition, before deciding whether you trigger an ERR_EXIT for the "while".

Yes, that's quite likely, but you're finding that with code that's
already broken (fails multiple C03traps tests).  You can run
  make check TESTNUM=C03
  make check TESTNUM=E01
to determine whether an experimental change is going to regress a
different variation.

> Here is an observation that could save some complexity. A non-zero exit status either immediately triggers an ERR_EXIT, like in "false" or it doesn't like in "false && true" and instead bubbles up to the first enclosing function

It isn't really helping to repeat the observation that the behavior is
not as specified; getting the internal state to reflect "instead
bubbles up" is exactly the complexity.




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