#
# Switches from rxvt to xterm if the defined terminal does not exist
-if [[ "$TERM" == "rxvt-" ]] && which tput >/dev/null 2>&1; then
+## if this is a dump term, return without setting up anything
+if [[ $TERM == "dumb" ]]; then
+ unsetopt zle
+ PS1='$ '
+ return
+fi;
+
+
+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 [[ "$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;
# vim:ft=zsh