1

I'm using ZShell with Oh-My-Zsh on OS X 10.8. Updates within my search path aren't immediately recognized. My search path:

[~]$ echo $PATH
/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin

I had git in /usr/bin. I used macports to install git, so after the port install the new executable is in /opt/local/bin. But git command and which git still use the older one in /usr/bin. If I open a new terminal window the new git in /opt is correctly used.

So how do you get zsh to recognize the updates to files in the path during the current shell session? Is it running some other command that's cached and needs updating?

2

You need to rehash the known commands:

rehash

That's all!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.