Trying to change my command prompt in OS X 10.8 / Mountain Lion. Changes to ~/.bashrc and ~/.bash_profile do not make any difference. Like:
export PS1="\W \$"
It defaults to the host name ("\h\%"). Even if I try to set PS1 in the terminal, it changes but displays the variables literally, as below:
ws10% PS1="\W \$"
\W $
(with ws10 being the host name)
My ~/.bashrc file:
export PS1="\W \$ "
Any ideas? I keep getting lost when I cd up and down the directory structure! Thanks a lot.
bashrcin your home directory is getting sourced since you're seeing the changes to your prompt. At this point, I'd recommend copying the systembashrcfrom/etcand starting fresh. Edit thePS1variable after copying it over. – ephsmith Aug 17 '12 at 15:17~/.profilereally is a good place for this. Regardless, you should see the update if you exportPS1at the commandline. Strange. – ephsmith Aug 17 '12 at 15:37