zsh-users
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Ray Andrews <rayandrews@eastlink.ca>
Cc: zsh-users@zsh.org
Subject: Re: trap question
Date: Fri, 25 Nov 2022 20:50:37 -0800	[thread overview]
Message-ID: <CAH+w=7aVC3RPbbiAhBvjoZHeD1--EkYapQr4GNYHUP-iQB6Q4A@mail.gmail.com> (raw)
In-Reply-To: <e51e8991-9fe1-d8f7-9665-750be835de19@eastlink.ca>

On Fri, Nov 25, 2022 at 8:27 PM Ray Andrews <rayandrews@eastlink.ca> wrote:
>
> On 2022-11-25 17:57, Bart Schaefer wrote:
> > Depends on the error.  If you have "setopt err_exit" (or err_return)
> > then the trap will be tripped when something returns false,
>
> I have that off by default, sounds like it should be on.

No, it should not be on.  I was giving an example of an error where an
exit trap would be tripped, not implying that you want that condition
to be an error.  If a command returning false is an error you should
be explicitly handling that and doing a normal return/exit.


  parent reply	other threads:[~2022-11-26  4:52 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-25 18:35 Ray Andrews
2022-11-25 18:57 ` Roman Perepelitsa
2022-11-25 23:25   ` Ray Andrews
2022-11-26  1:57     ` Bart Schaefer
2022-11-26  4:25       ` Philippe Altherr
2022-11-26  4:27       ` Ray Andrews
2022-11-26  4:49         ` Lawrence Velázquez
2022-11-26  4:50         ` Bart Schaefer [this message]
2022-11-26 15:03           ` Ray Andrews
2022-11-26 15:25             ` Roman Perepelitsa
2022-11-27  1:49               ` Ray Andrews

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=7aVC3RPbbiAhBvjoZHeD1--EkYapQr4GNYHUP-iQB6Q4A@mail.gmail.com' \
    --to=schaefer@brasslantern.com \
    --cc=rayandrews@eastlink.ca \
    --cc=zsh-users@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).