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

Re: Global History Substitution



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?

I think :gs should always be treated as a unit.

} and then not treating the rest as text.  This might make the proposal
} less than usable.

The same thing occurred to me when I saw your previous message.
 
} 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).

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   



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