# HG changeset patch # User edogawaconan # Date 1413509016 -32400 # Node ID 0ab0820fd528e64dfe41e9506e19b5de660c4ff2 # Parent de3ff51840a35933bdd88f8cf6944eb4c0eeb0e4 Red-colored prompt for root? diff -r de3ff51840a3 -r 0ab0820fd528 rc/bashrc --- a/rc/bashrc Thu Oct 16 21:47:36 2014 +0900 +++ b/rc/bashrc Fri Oct 17 10:23:36 2014 +0900 @@ -230,8 +230,10 @@ case "${TERM}" in xterm*|screen*|dtterm*) PROMPT_COMMAND='echo -ne "\033]0;'"${USER:-$LOGNAME}@$(uname -n)"': ${PWD}\007";'"${PROMPT_COMMAND}" - # DragonFly's Bash is a bit buggy. - if [ "$(uname)" != "DragonFly" ]; then + if [ "$(id -u)" = "0" ]; then + PS1='\[\e[1;31m\]\u@\h:\w\$\[\e[0m\] ' + elif [ "$(uname)" != "DragonFly" ]; then + # DragonFly's Bash is a bit buggy. PS1='\[\e[0;33m\]\u\[\e[0m\]@\[\e[0;32m\]\h\[\e[0m\]:\[\e[0;36m\]\w\[\e[0m\]\$ ' fi ;;