From dab65be727bafe57df1370f2dd4959f071965ea9 Mon Sep 17 00:00:00 2001 From: nyuszika7h Date: Sat, 29 Oct 2011 12:31:14 +0300 Subject: [PATCH] bashrc: Light green for normal user and red for root, like with zsh. --- bashrc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/bashrc b/bashrc index c17dd77f..09d06cb2 100644 --- a/bashrc +++ b/bashrc @@ -67,6 +67,13 @@ else fi unset color_prompt force_color_prompt +# check if we're root +if [[ $EUID == 0 ]]; then + PS1='\033[1;31m\u@\h:\w\$\033[0m ' +else + PS1='\033[1;32m\u@\h:\w\$\033[0m ' +fi + # If this is an xterm set the title to user@host:dir case "$TERM" in xterm*|rxvt*)