diff options
author | Aron Griffis <agriffis@gentoo.org> | 2004-08-08 01:42:18 +0000 |
---|---|---|
committer | Aron Griffis <agriffis@gentoo.org> | 2004-08-08 01:42:18 +0000 |
commit | 2c710cae96837d7a89637712ccb5d96b51c8ce81 (patch) | |
tree | 4c75adf1a5bb1896c188e8600f36c8d6a4888146 /app-shells/bash/files/bashrc | |
parent | new ebuild as per bug 42324 (Manifest recommit) (diff) | |
download | gentoo-2-2c710cae96837d7a89637712ccb5d96b51c8ce81.tar.gz gentoo-2-2c710cae96837d7a89637712ccb5d96b51c8ce81.tar.bz2 gentoo-2-2c710cae96837d7a89637712ccb5d96b51c8ce81.zip |
Restore red prompt for root #59678
Diffstat (limited to 'app-shells/bash/files/bashrc')
-rw-r--r-- | app-shells/bash/files/bashrc | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/app-shells/bash/files/bashrc b/app-shells/bash/files/bashrc index bb72d3503306..51bec63f8964 100644 --- a/app-shells/bash/files/bashrc +++ b/app-shells/bash/files/bashrc @@ -1,5 +1,5 @@ # /etc/bash.bashrc: -# $Header: /var/cvsroot/gentoo-x86/app-shells/bash/files/bashrc,v 1.1 2004/07/22 02:30:30 agriffis Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-shells/bash/files/bashrc,v 1.2 2004/08/08 01:42:18 agriffis Exp $ # # This file is sourced by all *interactive* bash shells on startup, # including some apparently interactive shells such as scp and rcp @@ -16,8 +16,17 @@ fi # Set colorful PS1 only on colorful terminals if dircolors --print-database | grep -Fqx "TERM $TERM"; then - PS1='\[\033[01;32m\]\u@\h \[\033[01;34m\]\w \$ \[\033[00m\]' + if [[ $EUID == 0 ]]; then + PS1='\[\033[01;31m\]\h \[\033[01;34m\]\W \$ \[\033[00m\]' + else + PS1='\[\033[01;32m\]\u@\h \[\033[01;34m\]\w \$ \[\033[00m\]' + fi else - PS1='\u@\h \w \$ ' + if [[ $EUID == 0 ]]; then + # show root@ when we don't have colors + PS1='\u@\h \W \$ ' + else + PS1='\u@\h \w \$ ' + fi fi export PS1 |