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 25355
- From: "Rocky Bernstein" <rocky.bernstein@xxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: trap DEBUG should get run beforehand, not afterwards.
- Date: Wed, 30 Jul 2008 09:24:14 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=kA/XkJMWhOXDCM5+YV0pS5aCOUibz07DErCwS8/YIk0=; b=xIuesLI3HVWAOGN46HxubBruiU1qjkm4mDG4DGyPKhTJ62nTFMsnyFXpJqqZInQUaC giVnruGp1t15nfIJ+LI2p2z76p6qKOG30BIYxqjBuEwwiknM1SW/NzsoqCln6ssUzY/C 7iizm0Ql9GBugajcFi35JLcfCCKu9AMklNjoQ=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=TH2tKSjzHOa7ROjW25iQod1Qyn7qQu3ojHRmKQkKiEHupVlxb18CrlMv2ijoewsbtQ A43nYRCuNajYBp9n4orzyYt8j/0zMG5Pig+v1yq/XdCgGoaTbwI8oNYxW/yqDc5P0YUR AJkc3VvlJ1qhYZbAYSaWi+ZpLgsSy/6eo8B/8=
- In-reply-to: <200807300823.m6U8Ndvs016235@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <6cd6de210807291937p5e864c38o6dd9785acf62632c@xxxxxxxxxxxxxx> <200807300823.m6U8Ndvs016235@xxxxxxxxxxxxxx>
Thanks!
A minor quibble is that the default is set in a way that will likely
cause confusion and the learning zsh-specific remedy . Are most of the
zsh defaults set so that they are compatible with ksh88 and bash 2.05a
and before?
If there is someone out there that has a program that requires trap
DEBUG to run afterwards I'd be interested in hearing.
Am having other problems with trap DEBUG and something causing an exit
condition without any sort of error indicating the why the exit is
raised and although I know probably where it is raised, I can't figure
out why it should be raised. However I've not been able to get a
simple example that shows the problem yet.
On Wed, Jul 30, 2008 at 4:23 AM, Peter Stephenson <pws@xxxxxxx> wrote:
> "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