zsh: command not found: ls
Posted
by ABach
on Stack Overflow
See other posts from Stack Overflow
or by ABach
Published on 2010-04-27T19:13:41Z
Indexed on
2010/04/27
19:23 UTC
Read the original article
Hit count: 425
I'm having a rather strange problem with zsh. When I start up my shell, everything - functions, environment vars, aliases, etc. - all work fine. I've created the following function and sourced it in zsh:
clean()
{
for i in /tmp/*
do
echo $i
done
}
Running clean
in the terminal works as expected, in that it prints out all the files in /tmp/. Afterward, however, trying any command - for example, ls - produces this:
zsh: command not found: ls
I have several other functions that work just fine, which leads me to believe that somehow, that loop is causing the problem. At any rate, this is very frustrating and I would sincerely appreciate the community's eyes. Thanks!
© Stack Overflow or respective owner