only do terminal magic if we have infocmp

This commit is contained in:
David Alexander Majnemer 2009-01-23 14:49:04 -06:00
parent 10d017a3c0
commit c04f430760

View file

@ -48,8 +48,9 @@ fix_terminfo_db ()
fi
}
# terminal surgery
case `uname -s` in
if ( command -v infocmp >/dev/null 2>&1 ) ; then
# terminal surgery
case `uname -s` in
Interix)
fix_terminfo_db "/usr/local"
;;
@ -59,21 +60,22 @@ case `uname -s` in
Darwin)
fix_terminfo_db "/opt/local"
;;
esac
esac
TERM=`fix_term $TERM`
TERM=`fix_term $TERM`
# I am sorry to hear that you are running an
# xterm that has no colors (I am looking at you solaris)
if [ $TERM = xterm ] && ( command -v tput >/dev/null 2>&1 ) && [ `tput -T xterm colors` = -1 ] ; then
# I am sorry to hear that you are running an
# xterm that has no colors (I am looking at you solaris)
if [ $TERM = xterm ] && ( command -v tput >/dev/null 2>&1 ) && [ `tput -T xterm colors` = -1 ] ; then
# lets see what we can do about your terrible term
TERM=`fix_term xterm-color`
fi
fi
export TERM
export TERM
case $TERM in
case $TERM in
*256*)
alias screen="screen -T `fix_term screen-256color-bce`"
;;
esac
esac
fi