diff options
author | 2004-08-08 01:42:18 +0000 | |
---|---|---|
committer | 2004-08-08 01:42:18 +0000 | |
commit | 2c710cae96837d7a89637712ccb5d96b51c8ce81 (patch) | |
tree | 4c75adf1a5bb1896c188e8600f36c8d6a4888146 /app-shells/bash | |
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')
-rw-r--r-- | app-shells/bash/ChangeLog | 5 | ||||
-rw-r--r-- | app-shells/bash/files/bashrc | 15 |
2 files changed, 16 insertions, 4 deletions
diff --git a/app-shells/bash/ChangeLog b/app-shells/bash/ChangeLog index c3e16f99bd78..fa9da023a48c 100644 --- a/app-shells/bash/ChangeLog +++ b/app-shells/bash/ChangeLog @@ -1,6 +1,9 @@ # ChangeLog for app-shells/bash # Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-shells/bash/ChangeLog,v 1.46 2004/08/02 22:30:18 agriffis Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-shells/bash/ChangeLog,v 1.47 2004/08/08 01:42:18 agriffis Exp $ + + 07 Aug 2004; Aron Griffis <agriffis@gentoo.org> files/bashrc: + Restore red prompt for root #59678 02 Aug 2004; Aron Griffis <agriffis@gentoo.org> files/bash-3.0-invisible.patch: 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 |