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

Re: ^foo^bar question



Francisco Borges wrote:
> % 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? 
>..
> BTW, Great to see 4.3.1 being released. Big thanks to all developers!!

If you've got 4.3.1 you can now use:

  ^foo^bar^:G

to do what you want.

-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


To access the latest news from CSR copy this link into a web browser:  http://www.csr.com/email_sig.php



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