* zsh bug: parsing error when "dir" is used as a variable name in zsh shell scripts
@ 2013-10-27 3:23 Tim Rand
2013-10-27 5:44 ` Bart Schaefer
0 siblings, 1 reply; 2+ messages in thread
From: Tim Rand @ 2013-10-27 3:23 UTC (permalink / raw)
To: zsh-workers
[-- Attachment #1: Type: text/plain, Size: 286 bytes --]
bash-3.2$ for dir in *
> do
> echo $dir
> done
0
% zsh --version
zsh 5.0.2 (x86_64-apple-darwin12.5.0)
% for dir in *
zsh: parse error near `-lSrah'
I noticed this because it causes ruby version manager (rvm) uses a similar
line.
Thank you in advance for considering the issue.
Tim
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: zsh bug: parsing error when "dir" is used as a variable name in zsh shell scripts
2013-10-27 3:23 zsh bug: parsing error when "dir" is used as a variable name in zsh shell scripts Tim Rand
@ 2013-10-27 5:44 ` Bart Schaefer
0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 2013-10-27 5:44 UTC (permalink / raw)
To: Tim Rand, zsh-workers
On Oct 26, 8:23pm, Tim Rand wrote:
}
} % for dir in *
} zsh: parse error near `-lSrah'
You must have an alias for "dir" coming from somewhere. Furthermore you
must have what's called a global alias for dir; probably it looks like
alias -g dir="ls -lSrah"
It's almost certainly the case that you don't want the "-g" in there.
Note:
torch% alias -g dir="ls -lSrah"
torch% for dir in *
zsh: parse error near `-lSrah'
torch% alias dir="ls -lSrah"
torch% for dir in *
for>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-10-27 5:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-27 3:23 zsh bug: parsing error when "dir" is used as a variable name in zsh shell scripts Tim Rand
2013-10-27 5:44 ` Bart Schaefer
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).