zsh-users
 help / color / mirror / code / Atom feed
From: Paul Ackersviller <paulda@home.com>
To: Bart Schaefer <schaefer@candle.brasslantern.com>
Cc: Zsh users list <zsh-users@sunsite.auc.dk>
Subject: TRAPZERR() in chpwd()
Date: Mon, 1 May 2000 13:13:28 -0400	[thread overview]
Message-ID: <20000501131328.A11940@tdc134.comm.mot.com> (raw)
In-Reply-To: <1000429044220.ZM30544@candle.brasslantern.com>; from schaefer@candle.brasslantern.com on Sat, Apr 29, 2000 at 04:42:20AM +0000

On Sat, Apr 29, 2000 at 04:42:20AM +0000, Bart Schaefer wrote:
> On Apr 28,  4:15pm, Paul Ackersviller wrote:
> }
> } I guess it's intentional now that all tests which fail in chpwd() cause
> } TRAPZERR() to be executed.
> 
> Why do you guess that?  It's certainly a surprise to me.  Could you give
> a more specific example of what you mean, though?  TRAPZERR() is called
> any time any command exits with a nonzero status, in chpwd or anywhere
> else, and as far as I can tell it always has.

Yes, I know all that; what I meant by `tests' was internal shell tests as
opposed to external programs or other commands.  Here's a simplified example
of what I'm seeing.
	TRAPZERR () { echo exit code $?; }
	chpwd () { [ -h $PWD ] && echo symlink; true; }
When I change to a directory that's not a soft link, I'm getting the `exit
code' message from 3.1.7-pre-1, whereas I never have with earlier versions.
I'm just wondering which way is correct, or are all versions correct and I'm
just missing out on understanding something else that's related?

> There is a bug in unsetting TRAPxxx (as opposed to resetting them to
> something else) when localtraps is set.  You might try `trap - ZERR' or
> `disable -f TRAPZERR' instead for now.

Thanks, `trap - ZERR' is really what I meant to do all along, i.e. affect
only local behaviour inside the function, not global.

-- 
Paul Ackersviller


  reply	other threads:[~2000-05-01 17:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-04-28 20:15 localtraps causing core dump in 3.1.6+ Paul Ackersviller
2000-04-29  4:42 ` Bart Schaefer
2000-05-01 17:13   ` Paul Ackersviller [this message]
2000-05-01 18:22     ` TRAPZERR() in chpwd() Bart Schaefer

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=20000501131328.A11940@tdc134.comm.mot.com \
    --to=paulda@home.com \
    --cc=schaefer@candle.brasslantern.com \
    --cc=zsh-users@sunsite.auc.dk \
    /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).