Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Global History Substitution
- X-seq: zsh-users 9635
- From: Peter Stephenson <pws@xxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: Global History Substitution
- Date: Fri, 4 Nov 2005 16:12:49 +0000
- Cc: zsh-users@xxxxxxxxxx
- In-reply-to: <1051104151306.ZM23386@xxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- Organization: Cambridge Silicon Radio
- References: <20051103190747.GA16897@xxxxxxxxxxxxxxxx> <20051104110932.612805c7.pws@xxxxxxx> <20051104113038.7f3c8dcd.pws@xxxxxxx> <1051104151306.ZM23386@xxxxxxxxxxxxxxxxxxxxxxx>
Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> 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 <pws@xxxxxxx> 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author