All pastes #774943 Raw Edit

Mine

public text v1 · immutable
·published 2007-11-15 13:03 UTC
rendered paste body
# set a fancy prompt (non-color, unless we know we "want" color)
#case "$TERM" in
#xterm-color)
 #   PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
  #  ;;
#*)
 #   PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
  #  ;;
#esac


function setprompt
{
export black="\[\033[30m\]"
export grey="\[\033[1;30m\]"
export red="\[\033[1;31m\]"
export green="\[\033[1;32m\]"
export yellow="\[\033[1;33m\]"
export blue="\[\033[1;34m\]"
export magenta="\[\033[1;35m\]"
export cyan="\[\033[1;36m\]"
export white="\[\033[1;37m\]"
DATE=$(date +'%H:%M')
if [ `id -u` = 0 ] # check if user is root
then
export PS1="$yellow\${DATE}:$white[$yellow\u$white \w]$yellow =>$white "
else
export PS1="$cyan\${DATE}:$white[$cyan\u$white \w]$cyan =>$white "
fi
}
setprompt