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

Re: Zsh 3.1.6 - ${~foo} expansion bug



>>> "Jukka" == Jukka Laurila <jplauril@xxxxxxxxx> writes:

[...]

 Jukka> I just tried compiling zsh-3.1.6-dev-17 both with gcc 2.95.2 in my
 Jukka> Debian Potato environment and with egcs-2.91.66 in my RedHat 6.1
 Jukka> environment (using chroot). The one compiled in Potato was broken
 Jukka> but the one compiled in RH 6.1 worked!

 Jukka> Could someone try compiling zsh with gcc 2.95.2 and tell me if it
 Jukka> breaks?

I can reproduce this with zsh patched up to date (Debian, gcc 2.95.2).

>From my experiments I am tempted to deduce that this is
reproducible as long as you don't call a builtin before
the for loop.

~/tmp/tmp % zsh -f                                                     0:10 #27
phobos% f=*
phobos% for i ($~f) echo $i
a b c d
phobos% for i ($~f) echo $i
a
b
c
d
phobos% 
~/tmp/tmp % zsh -f                                                     0:10 #27
phobos% gcc
gcc: No input files
phobos% f=*
phobos% for i ($~f) echo $i
a b c d
phobos% 
~/tmp/tmp % zsh -f                                                     0:10 #27
phobos% cd .
phobos% f=*
phobos% for i ($~f) echo $i
a
b
c
d
phobos% 
~/tmp/tmp % zsh -f                                                     0:11 #27
phobos% /bin/echo

phobos% f=*
phobos% for i ($~f) echo $i
a b c d
phobos% 

-- 
Alexandre Duret-Lutz



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