zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Philippe Altherr <philippe.altherr@gmail.com>
Cc: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: [PATCH] Better ERR_EXIT and ERR_RETURN documentation
Date: Mon, 12 Dec 2022 08:21:51 -0800	[thread overview]
Message-ID: <CAH+w=7b8WPi8diBWqRpn6T0PqUxxX-ScbaRbEQw1s0zg9H2k9A@mail.gmail.com> (raw)
In-Reply-To: <CAGdYchuFZb17c+_iwNc_uVp+_0sVibU9=JUMzGOPQ2ahUCPbew@mail.gmail.com>

On Mon, Dec 12, 2022 at 8:04 AM Philippe Altherr
<philippe.altherr@gmail.com> wrote:
>
>> Except for the exceptions described below, the
>> logic is the same as that for tt(ERR_EXIT), except that an implicit
>> tt(return) statement is executed instead of an tt(exit).

That sentence is ... exceptional?  How about

  Except as explained below, an implicit tt(return) statement is
executed following the same logic described for tt(ERR_EXIT).

>> If tt(ERR_RETURN) and tt(ERR_EXIT) are both set, the latter takes
>> precedence. Hence, exit rather than return is triggered when a command
>> has a non-zero exit status.

Does this need to explain the interaction of the cases where ERR_EXIT
is ignored but ERR_RETURN is not?  As written it seems to imply that
exit would always occur in the cases where it would otherwise be a
return.


  reply	other threads:[~2022-12-12 16:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-12 16:03 Philippe Altherr
2022-12-12 16:21 ` Bart Schaefer [this message]
2022-12-13  0:02   ` 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=7b8WPi8diBWqRpn6T0PqUxxX-ScbaRbEQw1s0zg9H2k9A@mail.gmail.com' \
    --to=schaefer@brasslantern.com \
    --cc=philippe.altherr@gmail.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).