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

Re: PATCH: 3.1.6-pws-4: backreferences



Peter Stephenson wrote:

> Tanaka Akira wrote:
> > Z(2):akr@is27e1u11% Src/zsh -f
> > is27e1u11% setopt extendedglob
> > is27e1u11% a=abcdef
> > is27e1u11% echo ${a/(#b)a(?)c/$match[1]}        
> > def
> > 
> > It should be `bdef'. Since second time, it works well.
> 
> I've tried this on three different systems, with all the latest patches,
> and I don't get this, so I'm stuck at the moment.

I've run out of sync, then, because I get it too. And no wonder, in
subst.c:1291 replstr is still unconditionally singsub()ed (and indeed
if I execute different expansions, I always get the previous $match[1] 
inserted). And even if I quote the $match[1], it will not be
singsub()ed again (or not correctly? there is no tokenize() before the 
singusb() at glob.c:1850).

Hm, so how is this supposed to work: with or without quoting the beast?

Bye
 Sven


--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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