SOLVED: Changing PS1 "on the fly" for root
I have the following entry in my .bashrc which changes the prompt to a red background with white text when I am root.
if [ "$UID" = 0 ] then export PS1="\[\e[37;1;41m\]\h:\w [\!]\$>\[\e[0m\]" else export PS1="\h:\w [\!]\$> " fi the problem is I have to source .bashrc each time I switch users. Is there a way to make this happen upon switching users "on the fly"? UPDATE: The solution was as simple as moving the definition to the /etc/bashrc :rolleyes: Oh Well, you live...you learn ;) Thanks to all who responded. |
If it's set executable try:
ln -s .bashrc .bash_login Cheers, Tink |
All times are GMT -5. The time now is 05:14 AM. |