From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2418 invoked from network); 4 Nov 2005 16:13:09 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 4 Nov 2005 16:13:09 -0000 Received: (qmail 43353 invoked from network); 4 Nov 2005 16:13:01 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 4 Nov 2005 16:13:01 -0000 Received: (qmail 25514 invoked by alias); 4 Nov 2005 16:12:55 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9635 Received: (qmail 25503 invoked from network); 4 Nov 2005 16:12:55 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 4 Nov 2005 16:12:55 -0000 Received: (qmail 42359 invoked from network); 4 Nov 2005 16:12:55 -0000 Received: from cluster-d.mailcontrol.com (HELO rly05d.srv.mailcontrol.com) (217.69.20.190) by a.mx.sunsite.dk with SMTP; 4 Nov 2005 16:12:53 -0000 Received: from exchange03.csr.com (mailhost1.csr.com [81.105.217.43]) by rly05d.srv.mailcontrol.com (MailControl) with ESMTP id jA4GComK001865; Fri, 4 Nov 2005 16:12:50 GMT Received: from news01 ([10.103.143.38]) by exchange03.csr.com with Microsoft SMTPSVC(5.0.2195.6713); Fri, 4 Nov 2005 16:15:16 +0000 Date: Fri, 4 Nov 2005 16:12:49 +0000 From: Peter Stephenson To: Bart Schaefer Cc: zsh-users@sunsite.dk Subject: Re: Global History Substitution Message-Id: <20051104161249.0592620f.pws@csr.com> In-Reply-To: <1051104151306.ZM23386@candle.brasslantern.com> References: <20051103190747.GA16897@namib.cs.utk.edu> <20051104110932.612805c7.pws@csr.com> <20051104113038.7f3c8dcd.pws@csr.com> <1051104151306.ZM23386@candle.brasslantern.com> Organization: Cambridge Silicon Radio X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; i386-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 04 Nov 2005 16:15:16.0876 (UTC) FILETIME=[F1BA6CC0:01C5E15A] X-Scanned-By: MailControl A-05-40-01 (www.mailcontrol.com) on 10.68.0.115 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) 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.0.4 Bart Schaefer wrote: > On Nov 4, 11:30am, Peter Stephenson wrote: > } > } It does mean > } > } !!:s/foo/bar/:gs/this/that/ > } > } will change meaning, associating the g with the preceeding substitution > > Do you mean the following substitution? No, I did mean the preceeding; that was the change of meaning. Before it would have meant an s followed by a gs. With the original proposal it would have meant an s...:g followed by an s. > } Hmm, how about > } > } !!:s/foo/bar/:G > > Yes, I think that would be OK, especially because it also disambiguates > !!:s/foo/bar/:Gs/this/that/ -- the :G can always apply to the preceding > substitution and :g always to the following one. > > That just leaves the question of whether the G is ignored in the case > !!:Gs/foo/bar/ (where there is no preceding substitution). I think it's probably simpler always to require g at the start and :G at the end. I'll commit it in that form. -- Peter Stephenson Software Engineer CSR PLC, Churchill House, Cambridge Business Park, Cowley Road Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070 This message has been scanned for viruses by BlackSpider MailControl - www.blackspider.com