From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5897 invoked from network); 25 Mar 2009 14:49:49 -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; 25 Mar 2009 14:49:49 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 50270 invoked from network); 25 Mar 2009 14:49:44 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 25 Mar 2009 14:49:44 -0000 Received: (qmail 20196 invoked by alias); 25 Mar 2009 14:49:39 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 26784 Received: (qmail 20182 invoked from network); 25 Mar 2009 14:49:38 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 25 Mar 2009 14:49:38 -0000 Received: from cork.scru.org (cork.scru.org [209.20.67.2]) by bifrost.dotsrc.org (Postfix) with ESMTPS id D7C9E80590EB for ; Wed, 25 Mar 2009 15:49:34 +0100 (CET) Received: by cork.scru.org (Postfix, from userid 1000) id 13B7D104913; Wed, 25 Mar 2009 14:49:32 +0000 (UTC) Date: Wed, 25 Mar 2009 14:49:31 +0000 From: Clint Adams To: Vincent Lefevre , 516998@bugs.debian.org Cc: zsh-workers@sunsite.dk Subject: Re: Bug#516998: zsh regards reserved word as candidate for alias substitution Message-ID: <20090325144931.GA9330@scru.org> Mail-Followup-To: Vincent Lefevre , 516998@bugs.debian.org, zsh-workers@sunsite.dk References: <20090224231846.GA15279@vin.lip.ens-lyon.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090224231846.GA15279@vin.lip.ens-lyon.fr> User-Agent: Mutt/1.5.18 (2008-05-17) X-Virus-Scanned: ClamAV 0.92.1/9164/Wed Mar 25 05:02:31 2009 on bifrost X-Virus-Status: Clean On Wed, Feb 25, 2009 at 12:18:46AM +0100, Vincent Lefevre wrote: > POSIX.1-2008 says[*]: > > 2.3.1 Alias Substitution > [...] However, reserved words in correct grammatical context > shall not be candidates for alias substitution. > > [*] http://www.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_03_01 > > but zsh gives: > > vin% emulate sh > vin% alias !="echo OK" > vin% ! foo > OK foo > vin% > > instead of running command "foo". ksh93, pdksh, dash and bash > in POSIX mode all behave correctly. Where it seems that "correctly" means that setting the alias succeeds, but ! is never substituted.