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

Re: errexit and (Z)ERR trap regression



On Fri, Jun 21, 2024 at 1:03 PM Lawrence Velázquez <larryv@xxxxxxx> wrote:
>
> The full description of "set -e" in the fresh-out-of-the-oven
> POSIX.1-2024 is:
>
>         This requirement applies to the shell environment and each
>         subshell environment separately.  For example, in:
>
>                 set -e; (false; echo one) | cat; echo two
>
>         the `false' command causes the subshell to exit without
>         executing `echo one'

Hm, that doesn't directly address something like

  set -e; true && (false; echo one) || echo two

If the subshell should execute "echo one" then the parent should not "echo two".

Unfortunately I don't follow how any of the POSIX.1-2024 text is meant
to apply to

   set -e; true && { false; echo one; } || echo two

Is "false" there considered to be "any command of an AND-OR list" ?




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