Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Global History Substitution



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