The fix above will make zsh not complain, but it still doesn't function correctly. This is because:
% zsh -c 'args="a b c"; for f in $args; do echo $f; done'
a b c
while
% sh -c 'args="a b c"; for f in $args; do echo $f; done'
a
b
c
This does actually raise a more general issue, on why zsh, which is not posix compliant in these 2 regards is executing content written for a posix compatible shell (ie, running stuff in /etc/profile.d).
The fix above will make zsh not complain, but it still doesn't function correctly. This is because:
% zsh -c 'args="a b c"; for f in $args; do echo $f; done'
a b c
while
% sh -c 'args="a b c"; for f in $args; do echo $f; done'
a
b
c
I need to figure out how to make zsh do the right thing, info at http:// zsh.sourceforge .net/FAQ/ zshfaq03. html
This does actually raise a more general issue, on why zsh, which is not posix compliant in these 2 regards is executing content written for a posix compatible shell (ie, running stuff in /etc/profile.d).