1
0
mirror of https://github.com/aquatix/dotfiles.git synced 2025-12-06 22:55:10 +01:00

Support root user in prompt: paint it red

This commit is contained in:
Michiel Scholten
2014-07-16 16:29:54 +02:00
parent fbaadf380e
commit 31eab56920

View File

@@ -75,8 +75,11 @@ if [ "$color_prompt" = yes ]; then
BLUE="\[\033[0;34m\]" BLUE="\[\033[0;34m\]"
YELLOW="\[\033[0;33m\]" YELLOW="\[\033[0;33m\]"
GREEN="\[\033[0;32m\]" GREEN="\[\033[0;32m\]"
RED="\[\033[0;31m\]"
PROMPT_SYMBOL='$' 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$ " PS1="$YELLOW\t $GREEN\u$BLACK@\h:\W$ "
else else
PS1="$YELLOW\t $BLUE\u$BLACK@\h:\W$ " PS1="$YELLOW\t $BLUE\u$BLACK@\h:\W$ "