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

Re: Global History Substitution



On Fri, 4 Nov 2005 11:30:38 +0000,  wrote:

>Peter Stephenson <pws@xxxxxxx> wrote:
>> It turns out that fixing the code to use :g like a qualifier isn't that
>> difficult, however...  that's ^b^beta^:g, since if the colon is missing the
>> g is treated like ordinary text.
>
>One subtlety is that we should ensure that
>
>  !!:gs/foo/bar/:gs/this/that/
>
>works as it always did, i.e. the g goes with the following s in both
>cases.  I can fix that.
>
>It does mean
>
>  !!:s/foo/bar/:gs/this/that/
>
>will change meaning, associating the g with the preceeding substitution
>and then not treating the rest as text.  This might make the proposal
>less than usable.
>
>Using an uncoloned g isn't really a good idea since history always
>treats trailing text as command line argument and I wouldn't want to change
>that.
>
>Hmm, how about
>
>  !!:s/foo/bar/:G
>
>or
>
>  ^foo^bar^:G
Yes Please!

-- 
zzapper
Success for Techies and Vim,Zsh tips
http://SuccessTheory.com/



Messages sorted by: Reverse Date, Date, Thread, Author