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

^foo^bar question



Hello!

 I recently started using the ^foo^bar trick a lot. However I discovered
that if I use: 

% mv ../2500s_4p_3ftr.txt 4p
% ^4^8
% mv ../2500s_8p_3ftr.txt 4p  # second "4" is unchanged.
                         ^^^^
  where only the first string occurence gets replaced. This happens with
4.2.5, 4.3.0-dev-1 and 4.3.1. Is this the intended behavior? 

Is there any way to get multiple substitutions using ^foo^bar? 

(I know I can use !!:gs/foo/bar)

Using "s/foo/bar" only changes the first occurence but that's documented in
the manual, while ^foo^bar does not mention "first occurence only"... so
thought I should ask.

BTW, Great to see 4.3.1 being released. Big thanks to all developers!!

Francisco.



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