]> git.donarmstrong.com Git - zsh.git/blobdiff - .zsh/zshrc/10_switch_term
add ~/.local/bin to PATH
[zsh.git] / .zsh / zshrc / 10_switch_term
index a6397e0eab84039ddb7903ed4a38a15e96e9266d..0dbc66caabdf37483006303773e6e248e5b78df1 100644 (file)
@@ -3,6 +3,14 @@
 #
 # Switches from rxvt to xterm if the defined terminal does not exist
 
+## 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-}"
@@ -15,5 +23,11 @@ if [[ "$TERM" =~ "stterm-" ]] && which tput >/dev/null 2>&1; then
         export TERM
     fi;
 fi;
+if [[ "$TERM" =~ "st-" ]] && which tput >/dev/null 2>&1; then
+    if [[ -z "$(tput longname 2>/dev/null)" ]]; then
+        TERM="xterm-${TERM##st-}"
+        export TERM
+    fi;
+fi;
 
 # vim:ft=zsh