Change Command Prompt - Variables are literal, and changes to .bashrc or .bash_profile not making a difference
Typically on Mac OS X, only .bash_profile is executing when starting a new terminal. A common solution is to source one file into the other, for example in ~/.bashrc:

[ -r ~/.bash_profile ] &amp;&amp; source ~/.bash_profile


Apart from that, your example works perfectly fine for me when put in .bash_profile. If you still experience problems, maybe you are overlooking something else?