Zsh Mailing List Archive
Messages sorted by:
Re: Weird exit caused in a trap DEBUG which sources a file.
- X-seq: zsh-workers 25380
- From: Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: Weird exit caused in a trap DEBUG which sources a file.
- Date: Sun, 3 Aug 2008 12:50:33 +0100
- In-reply-to: <6cd6de210808030428odaee1e6ja511305c6dd4ac46@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <6cd6de210807301938m28e05c84vf6296aa5b1bc0d44@xxxxxxxxxxxxxx> <200807310901.m6V91g8T002478@xxxxxxxxxxxxxx> <6cd6de210807310305q5954b65ax405f51e54d6754ee@xxxxxxxxxxxxxx> <6cd6de210808010529h11898619kba301fddf8b72f00@xxxxxxxxxxxxxx> <20080801143747.19b65086@news01> <6cd6de210808010821g3117fe62y82bd580811dbba8a@xxxxxxxxxxxxxx> <200808011531.m71FVIFl028545@xxxxxxxxxxxxxx> <6cd6de210808020421k78d716a0mc995862eb761ea2@xxxxxxxxxxxxxx> <20080803114215.219b616a@pws-pc> <6cd6de210808030428odaee1e6ja511305c6dd4ac46@xxxxxxxxxxxxxx>
On Sun, 3 Aug 2008 07:28:37 -0400
"Rocky Bernstein" <rocky.bernstein@xxxxxxxxx> 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
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@xxxxxxxxxxxx>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/
Messages sorted by: