From 31eab56920af5d6842b6f38c6600ce53ed14864e Mon Sep 17 00:00:00 2001 From: Michiel Scholten Date: Wed, 16 Jul 2014 16:29:54 +0200 Subject: [PATCH] Support root user in prompt: paint it red --- .bashrc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.bashrc b/.bashrc index dbc1573..9e998d3 100644 --- a/.bashrc +++ b/.bashrc @@ -75,8 +75,11 @@ if [ "$color_prompt" = yes ]; then BLUE="\[\033[0;34m\]" YELLOW="\[\033[0;33m\]" GREEN="\[\033[0;32m\]" + RED="\[\033[0;31m\]" PROMPT_SYMBOL='$' - if [ -e ~/.dot_is_server ]; then + if [ $USER = 'root' ]; then + PS1="$RED\t $GREEN\u$BLACK@\h:\W$ " + elif [ -e ~/.dot_is_server ]; then PS1="$YELLOW\t $GREEN\u$BLACK@\h:\W$ " else PS1="$YELLOW\t $BLUE\u$BLACK@\h:\W$ "