zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@zsh.org
Subject: Re: errexit and (Z)ERR trap regression
Date: Fri, 21 Jun 2024 13:36:59 -0700	[thread overview]
Message-ID: <CAH+w=7ZZsBk6uibaSfLNmvNGf8Uwv1FQ7nZAuPz2xB7zMjh4rQ@mail.gmail.com> (raw)
In-Reply-To: <2a5f0fa7-23bf-4069-b237-d304965f142e@app.fastmail.com>

On Fri, Jun 21, 2024 at 1:03 PM Lawrence Velázquez <larryv@zsh.org> 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" ?


  reply	other threads:[~2024-06-21 20:37 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-20 17:12 Martijn Dekker
2024-06-21 18:46 ` Bart Schaefer
2024-06-21 20:02   ` Lawrence Velázquez
2024-06-21 20:36     ` Bart Schaefer [this message]
2024-06-22  5:49       ` Lawrence Velázquez
2024-06-24 23:02         ` Bart Schaefer
2024-06-26 12:42           ` Philippe Altherr
2024-06-26 21:43             ` Bart Schaefer
2024-06-27  2:01               ` Philippe Altherr
2024-06-27 16:43                 ` Bart Schaefer
2024-06-27 17:09                   ` Philippe Altherr

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAH+w=7ZZsBk6uibaSfLNmvNGf8Uwv1FQ7nZAuPz2xB7zMjh4rQ@mail.gmail.com' \
    --to=schaefer@brasslantern.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).