zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.w.stephenson@ntlworld.com>
To: zsh-workers@sunsite.dk
Subject: Re: Weird exit caused in a trap DEBUG which sources a file.
Date: Sun, 3 Aug 2008 12:50:33 +0100	[thread overview]
Message-ID: <20080803125033.4f9a7565@pws-pc> (raw)
In-Reply-To: <6cd6de210808030428odaee1e6ja511305c6dd4ac46@mail.gmail.com>

On Sun, 3 Aug 2008 07:28:37 -0400
"Rocky Bernstein" <rocky.bernstein@gmail.com> wrote:
> I do not see why this is semantically complicated when the trap DEBUG
> occurs before the statement it refers to is run.  Can you give a very
> specific example of something you feel is tricky?

You mean that the new return value from a DEBUG trap should skip
everything that would happen until the next trap is run?  That's kind of
what I ended up saying, and that's well-defined.

> David Korn made a mistake and he says so.  Chet Ramey also says he
> changed the behavior because he thought it a mistake too. zsh copied
> the mistake. The only claim I've heard for keeping the mistake is
> compatibility with previous versions of zsh. However right now there
> is no evidence that anyone is making use of this mistake that would
> not be happier if it weren't made.

Well, there's no actual evidence it won't cause the toppling of
governments in small Himalayan kingdoms, either.  We probably won't find
out unless we change the default.  I agree setting DEBUG_BEFORE_CMD is
generally more useful, but you're the only user of the feature I've
heard from at all, and I still don't know if there's anything that makes
it hard to set the feature explicitly, in either direction (and at least
trying to set it in your script is the only way to guarantee the correct
behaviour).

If you're going to produce a working debugger that requires this to be
set then I'll be very tempted to change the default, since a generally
available working debugger is extremely useful.

Any definite views from anyone else are welcome.

-- 
Peter Stephenson <p.w.stephenson@ntlworld.com>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/


  reply	other threads:[~2008-08-03 11:51 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-31  2:38 Rocky Bernstein
2008-07-31  9:01 ` Peter Stephenson
2008-07-31 10:05   ` Rocky Bernstein
2008-08-01 12:29     ` Rocky Bernstein
2008-08-01 13:37       ` Peter Stephenson
2008-08-01 15:21         ` Rocky Bernstein
2008-08-01 15:31           ` Peter Stephenson
2008-08-02 11:21             ` Rocky Bernstein
2008-08-03 10:42               ` Peter Stephenson
2008-08-03 11:28                 ` Rocky Bernstein
2008-08-03 11:50                   ` Peter Stephenson [this message]
2008-08-05 11:18                     ` Rocky Bernstein

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=20080803125033.4f9a7565@pws-pc \
    --to=p.w.stephenson@ntlworld.com \
    --cc=zsh-workers@sunsite.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).