I'm using "oh-my-zsh".

I have an environment variable set to the current path, let's say:


and my zsh prompt looks like this:


while my bash prompt looks like this:


How can I configure the zsh prompt to behave like bash? I mean, I would like to see the full path in the prompt, even when there's a variable pointing to it.


Set your zsh prompt to use %d instead of %~

I'm not sure how oh-my-zsh implements it, but I'd start looking in ~/.zshrc

More info can be found at man zshmisc (search for 'EXPANSION OF PROMPT SEQUENCES')


Finally answered here:

Prevent zsh from setting the current prompt to the name of the variable that points to this path

The question was a duplicate but the other one didn't had an answer until now.

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.