From 698608c3c36189f6c14a22b2c25e27d5709cffc4 Mon Sep 17 00:00:00 2001 From: Tony Duckles Date: Mon, 31 Oct 2011 22:32:40 -0500 Subject: [PATCH] .bashrc: Gracefully fall-back to TERM=xterm-color --- .bashrc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.bashrc b/.bashrc index 25ca629..e9f61a9 100644 --- a/.bashrc +++ b/.bashrc @@ -16,6 +16,13 @@ HOSTFILE=~/.ssh/known_hosts # readline config INPUTRC=~/.inputrc +# if current $TERM isn't valid, fall-back to TERM=xterm-color +case $(tput colors 2>&1) in + tput* ) + export TERM=xterm-color + ;; +esac + if [ "$UNAME" = "Darwin" ]; then # Fink init, for OSX test -r /sw/bin/init.sh && -- 2.45.2