From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26679 invoked from network); 7 Aug 2008 10:41:01 -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 10:41:01 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 16312 invoked from network); 7 Aug 2008 10:40:51 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 7 Aug 2008 10:40:51 -0000 Received: (qmail 25673 invoked by alias); 7 Aug 2008 10:40:42 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 25417 Received: (qmail 25645 invoked from network); 7 Aug 2008 10:40:38 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 7 Aug 2008 10:40:38 -0000 Received: from mail.o2.co.uk (jabba.london.02.net [82.132.130.169]) by bifrost.dotsrc.org (Postfix) with ESMTP id E11BB8056E06 for ; Thu, 7 Aug 2008 12:40:34 +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 4898862E005439BF; Thu, 7 Aug 2008 12:57:59 +0100 Received: from chazelas by sc.homeunix.net with local (Exim 4.69) (envelope-from ) id 1KR2v0-00025d-Cw; Thu, 07 Aug 2008 11:40:30 +0100 Date: Thu, 7 Aug 2008 11:40:30 +0100 From: Stephane Chazelas To: Peter Stephenson Cc: Zsh hackers list Subject: Re: DEBUG_CMD_LINE (Was Re: PATCH: skip command from debug trap) Message-ID: <20080807104030.GA7373@sc.homeunix.net> Mail-Followup-To: Peter Stephenson , Zsh hackers list References: <6cd6de210808061419q2a81856cv62969490069e8f3e@mail.gmail.com> <20080807095441.3058605d@news01> <20080807093139.GA6839@sc.homeunix.net> <20080807111438.59126ef3@news01> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20080807111438.59126ef3@news01> User-Agent: Mutt/1.5.16 (2007-09-19) X-Virus-Scanned: ClamAV 0.92.1/7969/Thu Aug 7 11:12:24 2008 on bifrost X-Virus-Status: Clean On Thu, Aug 07, 2008 at 11:14:38AM +0100, Peter Stephenson wrote: [...] > > BTW, shouldn't PROMPT_SUBST be enabled by default in sh and ksh > > emulation? > > If they do that, then presumably yes. [...] It's required by SUSv3 for non-priviledged users for systems supporting the User Portability Utilities option (so include the sh of Unix conformant systems, but not necessarily POSIX conformant ones I suppose). > > 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. > > I don't see how this differs from the stuff in $(...), which is treated as > a complete command line. Do you mean you need code to run within > the current shell? [...] Yes, sorry, I forgot the most important part of my sentence, "without forking a subshell", or as you put it: "within the current shell" but I suppose it's not easy to determine what the current shell is when PS4 is expanded (especially in pipe-lines). The idea behind it being another way to have a DEBUG trap. -- Stéphane