From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22633 invoked by alias); 9 Mar 2015 11:46:33 -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: 34685 Received: (qmail 3387 invoked from network); 9 Mar 2015 11:46:31 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_00,TO_NO_BRKTS_PCNT autolearn=no version=3.3.2 Date: Mon, 9 Mar 2015 12:46:29 +0100 From: Vincent Lefevre To: zsh-workers@zsh.org Subject: Re: Aliasing separators (Re: grammar triviality with '&&') Message-ID: <20150309114629.GF26461@xvii.vinc17.org> Mail-Followup-To: zsh-workers@zsh.org References: <20150304144756.GA27231@ypig.lip.ens-lyon.fr> <150304175112.ZM19818@torch.brasslantern.com> <20150305100638.55631238@pwslap01u.europe.root.pri> <150305090720.ZM8441@torch.brasslantern.com> <20150305174011.0be5a31e@pwslap01u.europe.root.pri> <150305174240.ZM8732@torch.brasslantern.com> <20150306094039.3d968c63@pwslap01u.europe.root.pri> <150306112628.ZM9769@torch.brasslantern.com> <20150307155252.75848f74@ntlworld.com> <150307131008.ZM17180@torch.brasslantern.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <150307131008.ZM17180@torch.brasslantern.com> X-Mailer-Info: http://www.vinc17.net/mutt/ User-Agent: Mutt/1.5.23-6425-vl-r76280 (2015-03-04) On 2015-03-07 13:10:08 -0800, Bart Schaefer wrote: > Actually, that helped me to put some sort of explanation around my > intuition of how aliasing should work: > > A token may be expanded as an alias only if doing so cannot change the > lexical interpretation of any tokens that may appear adjacent to it. > > This emphasizes that "{this" expanding to "{ foothis" in the example at > the tail of my previous message, is a bug: The interpretation of "this" > has been changed, and the internal inconsistency is manifest when you > examine what has been stored in the history. Can't this be solved by adding a space during alias expansion? -- Vincent Lefèvre - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)