Bug 23979

Summary: broken parameter expansion?
Product: Sisyphus Reporter: Michael Shigorin <mike>
Component: zshAssignee: Fr. Br. George <george>
Status: CLOSED NOTABUG QA Contact: qa-sisyphus
Severity: major    
Priority: P3 CC: arseny, george, ldv
Version: unstable   
Hardware: all   
OS: Linux   

Description Michael Shigorin 2010-08-28 16:55:07 MSD
$ list="a b c"
$ for i in $list; do echo $i; done
a b c
$ rpm -q zsh
zsh-4.3.10-alt6
$ ls -l ~/.zshrc
-rw-r--r-- 1 mike mike 0 Aug 28 15:49 /home/mike/.zshrc

Reproducible on x86_64 and i586 builds, just in case.  And works as expected in bash:

[mike@pad ~]$ list="a b c"
[mike@pad ~]$ for i in $list; do echo $i; done
a
b
c
Comment 1 Fr. Br. George 2012-01-20 16:54:03 MSK
Are you suggesting to turn SH_WORD_SPLIT on by default? It's already turned on in sh emulation mode, and zsh isn't sh. Use ${=list} intead.