This is related to Open a new tab in the same directory. I have installed oh-my-zsh recently and it certainly kicks. I have some custom variables, like $WORKSPACE which I use to get around easily. And when I am inside one of those paths the prompt gets set to the name of the variable, for example ~WORKSPACE/project $ .
This breaks the "Open tab in the same directory feature" which I love so much. And whats puzzling me most here is that this does not happen for the ZSH variable. So cd $ZSH gives a prompt like ~/.oh-my-zsh $. And as far as I know they are bot set the same way in my .zshrc

  • Figured out as I was writing. The problem was that I was setting the custom vars after oh-my-zsh was loaded. Moving them up solved the problem, but I still dont understand what happened. Maybe its a oh-my-zsh feature? – Paulo Casaretto Sep 6 '12 at 19:55
  • If you've answered your question, you should type it up as an "answer" below and accept it. It will be more useful to people that land here in the future. :) – JoshP Sep 26 '12 at 13:57
  • Oops, forgot to. SU had a time period before I could do that. – Paulo Casaretto Sep 26 '12 at 16:27

Oh-my-zsh was setting auto_name_dirs which caused this behaviour.
I just commented out that line from lib/directories.zsh and everything went back to the way I wanted them.

| improve this answer | |
  • So... is this the answer to the question? I still don't know how to prevent zsh from setting the current prompt to the name of the variable that points to this path... – Sebastián Grignoli Apr 23 '13 at 15:14
  • Updated the answer, thanks for bringing this up again. – Paulo Casaretto Apr 23 '13 at 16:24
  • Dont forget to vote me up! :) – Paulo Casaretto Apr 23 '13 at 18:05

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.