From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5359 invoked from network); 30 Jul 2008 13:24:25 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00 autolearn=ham version=3.2.5 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 30 Jul 2008 13:24:25 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 17914 invoked from network); 30 Jul 2008 13:24:22 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 30 Jul 2008 13:24:22 -0000 Received: (qmail 10462 invoked by alias); 30 Jul 2008 13:24:20 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 25355 Received: (qmail 10451 invoked from network); 30 Jul 2008 13:24:19 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 30 Jul 2008 13:24:19 -0000 Received: from yw-out-2324.google.com (yw-out-2324.google.com [74.125.46.31]) by bifrost.dotsrc.org (Postfix) with ESMTP id 6F48A8027216 for ; Wed, 30 Jul 2008 15:24:16 +0200 (CEST) Received: by yw-out-2324.google.com with SMTP id 5so3990ywb.81 for ; Wed, 30 Jul 2008 06:24:15 -0700 (PDT) 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= Received: by 10.114.169.20 with SMTP id r20mr8432360wae.198.1217424254465; Wed, 30 Jul 2008 06:24:14 -0700 (PDT) Received: by 10.114.159.2 with HTTP; Wed, 30 Jul 2008 06:24:14 -0700 (PDT) Message-ID: <6cd6de210807300624j37ade3a3r91f1e0e03ad07188@mail.gmail.com> Date: Wed, 30 Jul 2008 09:24:14 -0400 From: "Rocky Bernstein" To: zsh-workers@sunsite.dk Subject: Re: trap DEBUG should get run beforehand, not afterwards. In-Reply-To: <200807300823.m6U8Ndvs016235@news01.csr.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <6cd6de210807291937p5e864c38o6dd9785acf62632c@mail.gmail.com> <200807300823.m6U8Ndvs016235@news01.csr.com> X-Virus-Scanned: ClamAV version 0.92.1, clamav-milter version 0.92.1 on bifrost X-Virus-Status: Clean 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 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 Software Engineer > CSR PLC, Churchill House, Cambridge Business Park, Cowley Road > Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070 >