eliteprompt() {
|
|
local NOCOLOR='\[\033[0m\]'
|
|
local BLUE='\[\033[1;34m\]'
|
|
local CYAN='\[\033[1;36m\]'
|
|
|
|
local ps1=
|
|
local ps1a=
|
|
|
|
local TTY='$(TTY=`tty` && echo ${TTY:5})'
|
|
local TITLEBAR=
|
|
|
|
case "$TERM" in
|
|
screen|screen-256color|putty|xterm*|rxvt)
|
|
TITLEBAR='\[\033]0;\u@\h \w\007\]'
|
|
;;
|
|
linux)
|
|
;;
|
|
esac
|
|
|
|
# timestamp
|
|
ps1="$BLUE[$CYAN\\t$BLUE]"
|
|
|
|
# user/host
|
|
ps1a="$NOCOLOR\\u$CYAN@$NOCOLOR\\h"
|
|
|
|
# workdir and tty
|
|
ps1="$ps1 $BLUE[$ps1a$CYAN($NOCOLOR$TTY$CYAN)$NOCOLOR\\W$BLUE]"
|
|
|
|
# and the prompt
|
|
export PS1="$TITLEBAR$ps1$CYAN\\\$$NOCOLOR "
|
|
}
|
|
|
|
eliteprompt
|
|
|
|
unset eliteprompt
|