comparison rc/bashrc @ 530:0ab0820fd528

Red-colored prompt for root?
author edogawaconan <me@myconan.net>
date Fri, 17 Oct 2014 10:23:36 +0900
parents 51a60cc44880
children 77c1f9e624a3
comparison
equal deleted inserted replaced
529:de3ff51840a3 530:0ab0820fd528
228 228
229 PS1='\u@\h:\w\$ ' 229 PS1='\u@\h:\w\$ '
230 case "${TERM}" in 230 case "${TERM}" in
231 xterm*|screen*|dtterm*) 231 xterm*|screen*|dtterm*)
232 PROMPT_COMMAND='echo -ne "\033]0;'"${USER:-$LOGNAME}@$(uname -n)"': ${PWD}\007";'"${PROMPT_COMMAND}" 232 PROMPT_COMMAND='echo -ne "\033]0;'"${USER:-$LOGNAME}@$(uname -n)"': ${PWD}\007";'"${PROMPT_COMMAND}"
233 # DragonFly's Bash is a bit buggy. 233 if [ "$(id -u)" = "0" ]; then
234 if [ "$(uname)" != "DragonFly" ]; then 234 PS1='\[\e[1;31m\]\u@\h:\w\$\[\e[0m\] '
235 elif [ "$(uname)" != "DragonFly" ]; then
236 # DragonFly's Bash is a bit buggy.
235 PS1='\[\e[0;33m\]\u\[\e[0m\]@\[\e[0;32m\]\h\[\e[0m\]:\[\e[0;36m\]\w\[\e[0m\]\$ ' 237 PS1='\[\e[0;33m\]\u\[\e[0m\]@\[\e[0;32m\]\h\[\e[0m\]:\[\e[0;36m\]\w\[\e[0m\]\$ '
236 fi 238 fi
237 ;; 239 ;;
238 esac 240 esac
239 241