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

Re: ideas



Christopher Craig wrote:
> 
> Included From: Quinn Dunkan <quinn@xxxxxxxxxxxxxxxxxxxxx>:
> 
> > and I've wondered why there isn't something like ${i:s/foo/bar} to
> > replace foo in $i with bar.
> 
> You could just use $i(:s/foo/bar).

Great! I, too, was wondering why there isn't such a thing. Now I wonder
if this feature is considered top secret. I can't find anything about it
in the docu.

And, BTW, at least in zsh-3.1.2-zefram3, this doesn't work correctly. 

   print abcdefg(:s/b/XY)
   aXYecdefg

where the e following Y has two dots on it. But this works:

   print abcdefg(:s/b/XY/)
   aXYcdefg

- Bernd

-- 
Bernd Eggink
Regionales Rechenzentrum der Universitaet Hamburg
eggink@xxxxxxxxxxxxxxxxxx
http://www.rrz.uni-hamburg.de/eggink/BEggink.html



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