From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14510 invoked from network); 7 Aug 2008 09:32:27 -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=AWL,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; 7 Aug 2008 09:32:27 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 96202 invoked from network); 7 Aug 2008 09:32:17 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 7 Aug 2008 09:32:17 -0000 Received: (qmail 5842 invoked by alias); 7 Aug 2008 09:32:06 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 25414 Received: (qmail 5808 invoked from network); 7 Aug 2008 09:32:01 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 7 Aug 2008 09:32:01 -0000 Received: from mail.o2.co.uk (vader.london.02.net [82.132.130.150]) by bifrost.dotsrc.org (Postfix) with ESMTP id 9F0328056E06 for ; Thu, 7 Aug 2008 11:31:57 +0200 (CEST) Received: from sc.homeunix.net (78.105.216.138) by mail.o2.co.uk (8.0.013.3) (authenticated as stephane.chazelas) id 4898742000511B31; Thu, 7 Aug 2008 10:31:40 +0100 Received: from chazelas by sc.homeunix.net with local (Exim 4.69) (envelope-from ) id 1KR1qO-0001qY-66; Thu, 07 Aug 2008 10:31:40 +0100 Date: Thu, 7 Aug 2008 10:31:40 +0100 From: Stephane Chazelas To: Peter Stephenson Cc: Rocky Bernstein , Zsh hackers list Subject: Re: DEBUG_CMD_LINE (Was Re: PATCH: skip command from debug trap) Message-ID: <20080807093139.GA6839@sc.homeunix.net> Mail-Followup-To: Peter Stephenson , Rocky Bernstein , Zsh hackers list References: <6cd6de210808061419q2a81856cv62969490069e8f3e@mail.gmail.com> <20080807095441.3058605d@news01> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20080807095441.3058605d@news01> User-Agent: Mutt/1.5.16 (2007-09-19) X-Virus-Scanned: ClamAV 0.92.1/7968/Thu Aug 7 10:32:30 2008 on bifrost X-Virus-Status: Clean On Thu, Aug 07, 2008 at 09:54:41AM +0100, Peter Stephenson wrote: [...] > It would be possible with a bit of fiddling to get the DEBUG trap to happen > at the level of elements of a sublist, i.e. commands separated by && and > ||, but I'm not sure if that's worth it. Beyond that you run into the > hideous complexity of pipelines and I don't think it can be pushed that far > down. [...] But see how PS4 is expanded for every command: $ zsh -o PROMPT_SUBST -c 'PS4="\$(od -vAn -N2 -x /dev/urandom) " set -x; : a | : b; : c && : d' 4542 : a e866 : b a7ad : c 6051 : d BTW, shouldn't PROMPT_SUBST be enabled by default in sh and ksh emulation? Is there a way to run shell code (other than assignments and arithmetic expansion) upon the expansion of PS4? I thought of /(e:code:), but in scalar context I couldn't find a way for globbing to be performed. -- Stéphane