From: Don Armstrong Date: Fri, 14 Apr 2017 17:16:47 +0000 (-0700) Subject: switch from rxvt to xterm if there's no termcap X-Git-Url: https://git.donarmstrong.com/?p=zsh.git;a=commitdiff_plain;h=67d7015320c70fd85571381fdcbfa52734866400 switch from rxvt to xterm if there's no termcap --- diff --git a/.zsh/zshrc/10_switch_term b/.zsh/zshrc/10_switch_term new file mode 100644 index 0000000..03406b0 --- /dev/null +++ b/.zsh/zshrc/10_switch_term @@ -0,0 +1,13 @@ +# -*- mode: sh -*- +# zshrc/10_switch_term +# +# Switches from rxvt to xterm if the defined terminal does not exist + +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; + +# vim:ft=zsh