From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23576 invoked by alias); 28 Apr 2010 08:56:46 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 27930 Received: (qmail 28390 invoked from network); 28 Apr 2010 08:56:44 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS autolearn=ham version=3.3.1 Received-SPF: none (ns1.primenet.com.au: domain at csr.com does not designate permitted sender hosts) Date: Wed, 28 Apr 2010 09:56:32 +0100 From: Peter Stephenson To: zsh-workers@zsh.org Subject: Re: global alias with leading space gives unexpected thing Message-ID: <20100428095632.17c28aa2@csr.com> In-Reply-To: References: <44891272404484@web144.yandex.ru> Organization: Cambridge Silicon Radio X-Mailer: Claws Mail 3.7.5 (GTK+ 2.18.9; i686-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 28 Apr 2010 08:56:33.0067 (UTC) FILETIME=[B352EFB0:01CAE6B0] X-Scanned-By: MailControl A_09_40_00 (www.mailcontrol.com) on 10.68.0.123 On Wed, 28 Apr 2010 00:02:00 +0200 Mikael Magnusson wrote: > Maybe something like this is needed? > > diff --git a/Src/lex.c b/Src/lex.c > index 8f43251..83257da 100644 > --- a/Src/lex.c > +++ b/Src/lex.c > @@ -1774,7 +1774,7 @@ exalias(void) > if (an && !an->inuse && > ((an->node.flags & ALIAS_GLOBAL) || incmdpos || > inalmore)) { inpush(an->text, INP_ALIAS, an); > - if (an->text[0] == ' ') > + if (an->text[0] == ' ' && !(an->node.flags & > ALIAS_GLOBAL)) aliasspaceflag = 1; > lexstop = 0; > if (zshlextext == copy) Yes, it's surely an oversight when it happens with global aliases. I've added this and noted it in the documentation. -- Peter Stephenson Software Engineer Tel: +44 (0)1223 692070 Cambridge Silicon Radio Limited Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, UK Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom