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? Commented Sep 6, 2012 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
    Commented Sep 26, 2012 at 13:57
  • Oops, forgot to. SU had a time period before I could do that. Commented Sep 26, 2012 at 16:27

1 Answer 1


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.

  • 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... Commented Apr 23, 2013 at 15:14
  • Updated the answer, thanks for bringing this up again. Commented Apr 23, 2013 at 16:24
  • Dont forget to vote me up! :) Commented Apr 23, 2013 at 18:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .