How to prevent zsh from showing environment variable name instead of current path?

5

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

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

PROJECT=/home/me/projects/client/project

and my zsh prompt looks like this:

me@my-machine:~PROJECT$ 

while my bash prompt looks like this:

me@my-machine:~/projects/client/project$ 

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.

Sebastián Grignoli

Posted 2013-04-23T15:22:32.500

Reputation: 249

Answers

3

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')

Jon Carter

Posted 2013-04-23T15:22:32.500

Reputation: 131

0

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.

Sebastián Grignoli

Posted 2013-04-23T15:22:32.500

Reputation: 249