From 67d7015320c70fd85571381fdcbfa52734866400 Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Fri, 14 Apr 2017 10:16:47 -0700 Subject: [PATCH] switch from rxvt to xterm if there's no termcap --- .zsh/zshrc/10_switch_term | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .zsh/zshrc/10_switch_term 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 -- 2.39.2