Closed breun closed 11 years ago
Hi @breun,
Thanks for your feedback. I'm not sure I understand the issue or situation. Your .bash_profile
goes in the user's ~/
. Are you setting your user PS1, but it is also changing the root user's PS1?
Could you provide specific step-by-step details to reproduce the bug?
Thanks
I'm running OS X 10.8.4 with bash 4.2.45(2)-release (i386-apple-darwin12.3.0) from MacPorts.
export PS1="\h:\W \u\$ "
into ~/.bash_profile
.sudo -s
.$
is still a $
, but should change into a #
to indicate you're now running as root.When using either export PS1="\h:\W \u\\$ "
or export PS1='\h:\W \u\$ '
this does work.
Sorry for the delay, but I've taken the \$ route - Thanks @breun
When using "\$ " as the end of my PS1 string on OS X, the $ doesn't change into a # after switching to root.
I have to either change it to "\$ " or use single quotes around the exported PS1 string.