Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Global History Substitution
- X-seq: zsh-users 9671
- From: zzapper <david@xxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: Global History Substitution
- Date: Tue, 08 Nov 2005 19:07:55 +0000
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20051103190747.GA16897@xxxxxxxxxxxxxxxx> <20051104110932.612805c7.pws@xxxxxxx> <20051104113038.7f3c8dcd.pws@xxxxxxx> <1051104151306.ZM23386@xxxxxxxxxxxxxxxxxxxxxxx> <20051104161249.0592620f.pws@xxxxxxx>
- Sender: news <news@xxxxxxxxxxxxx>
On Fri, 4 Nov 2005 16:12:49 +0000, wrote:
>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.
That's the beauty of zsh (and open source generally) that a few experts can respond to user requests
and decide that a new feature would be jolly useful and implement it. Quite exciting really!
--
zzapper
Success for Techies and Vim,Zsh tips
http://SuccessTheory.com/
Messages sorted by:
Reverse Date,
Date,
Thread,
Author