# \[\033[1;36m\][\w]\n\[\033[0;36m\][\h|\t]$ \[\033[0m\]
# make sure the term we're using exists in the termcap
- TOEOPT='-a'
- if ! toe $TOEOPT >/dev/null 2>&1; then
- TOEOPT=''
+ if [[ "$TERM" =~ "rxvt-" ]] && which tput >/dev/null 2>&1; then
+ if [[ -z "$(tput longname 2>/dev/null)" ]]; then
+ TERM="xterm-${TERM##rxvt-}"
+ export TERM
+ fi;
fi;
- if ! toe $TOEOPT|grep -q "^$TERM "; then
- # if it doesn't, try to switch
- case $TERM in
- rxvt*)
- TERM="rxvt"
- ;;
- xterm*)
- TERM="xterm"
- ;;
- *)
- ;;
- esac
- export TERM;
+ if [[ "$TERM" =~ "stterm-" ]] && which tput >/dev/null 2>&1; then
+ if [[ -z "$(tput longname 2>/dev/null)" ]]; then
+ TERM="xterm-${TERM##stterm-}"
+ export TERM
+ fi;
fi;
# If this is an xterm set the title to user@host:dir
case $TERM in
- screen|xterm*)
+ screen|xterm*|stterm*)
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'
;;
rxvt*)