4 # Switches from rxvt to xterm if the defined terminal does not exist
6 ## if this is a dump term, return without setting up anything
7 if [[ $TERM == "dumb" ]]; then
14 if [[ "$TERM" =~ "rxvt-" ]] && which tput >/dev/null 2>&1; then
15 if [[ -z "$(tput longname 2>/dev/null)" ]]; then
16 TERM="xterm-${TERM##rxvt-}"
20 if [[ "$TERM" =~ "stterm-" ]] && which tput >/dev/null 2>&1; then
21 if [[ -z "$(tput longname 2>/dev/null)" ]]; then
22 TERM="xterm-${TERM##stterm-}"
26 if [[ "$TERM" =~ "st-" ]] && which tput >/dev/null 2>&1; then
27 if [[ -z "$(tput longname 2>/dev/null)" ]]; then
28 TERM="xterm-${TERM##st-}"