From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15124 invoked from network); 26 Mar 2009 15:19:05 -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.4 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; 26 Mar 2009 15:19:05 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 68251 invoked from network); 26 Mar 2009 15:19:01 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 26 Mar 2009 15:19:01 -0000 Received: (qmail 23594 invoked by alias); 26 Mar 2009 15:18:57 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 26797 Received: (qmail 23581 invoked from network); 26 Mar 2009 15:18:56 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 26 Mar 2009 15:18:56 -0000 Received: from cluster-d.mailcontrol.com (cluster-d.mailcontrol.com [85.115.60.190]) by bifrost.dotsrc.org (Postfix) with ESMTPS id 1F66A80590EB for ; Thu, 26 Mar 2009 16:18:51 +0100 (CET) Received: from cameurexb01.EUROPE.ROOT.PRI ([193.128.72.68]) by rly13d.srv.mailcontrol.com (MailControl) with ESMTP id n2QFIj17019330 for ; Thu, 26 Mar 2009 15:18:47 GMT Received: from news01 ([10.99.50.25]) by cameurexb01.EUROPE.ROOT.PRI with Microsoft SMTPSVC(6.0.3790.3959); Thu, 26 Mar 2009 15:18:43 +0000 Date: Thu, 26 Mar 2009 15:18:43 +0000 From: Peter Stephenson To: zsh-workers@sunsite.dk Subject: Re: Bug#517008: alias not expanded with zsh -c Message-ID: <20090326151843.2309d713@news01> In-Reply-To: <090326081259.ZM9239@torch.brasslantern.com> References: <20090225022850.GA4841@vin.lip.ens-lyon.fr> <20090325145418.GB9330@scru.org> <200903251630.n2PGU8sK013449@news01.csr.com> <20090325172509.79c53d4d@news01> <090325111130.ZM7836@torch.brasslantern.com> <200903251820.n2PIK6JI016478@news01.csr.com> <090325171431.ZM8037@torch.brasslantern.com> <20090326095029.52a8ce33@news01> <090326081259.ZM9239@torch.brasslantern.com> Organization: CSR X-Mailer: Claws Mail 3.5.0 (GTK+ 2.12.8; i386-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 26 Mar 2009 15:18:43.0636 (UTC) FILETIME=[26999740:01C9AE26] X-Scanned-By: MailControl A_08_51_00 (www.mailcontrol.com) on 10.68.0.123 X-Virus-Scanned: ClamAV 0.92.1/9169/Thu Mar 26 05:13:48 2009 on bifrost X-Virus-Status: Clean On Thu, 26 Mar 2009 08:12:59 -0700 Bart Schaefer wrote: > Is it obvious enough that "evaluated as one unit" and "parsed in one go" > mean the same thing? And should that be tt(sh -c) rather than zsh? "parsed as one unit" might be better. Index: Doc/Zsh/options.yo =================================================================== RCS file: /cvsroot/zsh/zsh/Doc/Zsh/options.yo,v retrieving revision 1.79 diff -u -r1.79 options.yo --- Doc/Zsh/options.yo 26 Mar 2009 09:53:27 -0000 1.79 +++ Doc/Zsh/options.yo 26 Mar 2009 15:17:35 -0000 @@ -1721,12 +1721,13 @@ Alias expansion takes place while text is being read; hence when this option is set it does not take effect until the end of any function or -other piece of shell code evaluated as one unit. Note this may +other piece of shell code parsed as one unit. Note this may cause differences from other shells even when the option is in -effect. For example, when running a command with `tt(zsh -c)' the -entire command argument is parsed in one go, so aliases defined within -the argument are not available even in later lines. If in doubt, avoid use -of aliases in non-interactive code. +effect. For example, when running a command with `tt(zsh -c)', +or even `tt(zsh -o posixaliases -c)', the entire command argument is parsed +as one unit, so aliases defined within the argument are not available even +in later lines. If in doubt, avoid use of aliases in non-interactive +code. ) pindex(POSIX_BUILTINS) pindex(NO_POSIX_BUILTINS) -- Peter Stephenson Software Engineer CSR PLC, Churchill House, Cambridge Business Park, Cowley Road Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070