From: Don Armstrong Date: Tue, 25 Sep 2007 05:42:01 +0000 (+0000) Subject: * Switch to a TERM that exists if the one we're using doesn't X-Git-Url: https://git.donarmstrong.com/?p=home-base.git;a=commitdiff_plain;h=48088eefeaffec75acb6aa9fb4654dded9798f3f * Switch to a TERM that exists if the one we're using doesn't --- diff --git a/.bashrc b/.bashrc index e0af9c2..99e079c 100644 --- a/.bashrc +++ b/.bashrc @@ -35,6 +35,21 @@ if [ "$PS1" ]; then PS1="\[\033[0;36m\]\h \t \w$\[\033[0m\] " # \[\033[1;36m\][\w]\n\[\033[0;36m\][\h|\t]$ \[\033[0m\] + # make sure the term we're using exists in the termcap + if ! toe -a|grep -q "^$TERM "; then + # if it doesn't, try to switch + case $TERM in + rxvt*) + TERM="rxvt" + ;; + xterm*) + TERM="xterm" + ;; + *) + ;; + esac + export TERM; + fi; # If this is an xterm set the title to user@host:dir case $TERM in screen|xterm*)