Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: trap DEBUG should get run beforehand, not afterwards.
- X-seq: zsh-workers 25351
 
- From: Peter Stephenson <pws@xxxxxxx>
 
- To: zsh-workers@xxxxxxxxxx
 
- Subject: Re: trap DEBUG should get run beforehand, not afterwards.
 
- Date: Wed, 30 Jul 2008 09:23:39 +0100
 
- In-reply-to: <6cd6de210807291937p5e864c38o6dd9785acf62632c@xxxxxxxxxxxxxx>
 
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
 
- References: <6cd6de210807291937p5e864c38o6dd9785acf62632c@xxxxxxxxxxxxxx>
 
"Rocky Bernstein" wrote:
> Think for example about whether you'd like to know that 'rm -fr *' is
> about to occur or just occurred.
> 
> ksh introduced trap DEBUG and bash, and zsh copied it. Both ksh and
> bash originally ran after the statement; I guess because that is same
> as other traps. However both have switched so that it is run before
> the statement.
> 
> Alas, it's impossible to contemplate writing any sort of serious
> debugger unless  "trap DEBUG" gets run beforehand.
Use the option DEBUG_BEFORE_CMD.
-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070
Messages sorted by:
Reverse Date,
Date,
Thread,
Author