Use local terminfo for the systems which don't have screen-256color.

This commit is contained in:
Vahagn Khachatryan
2016-04-13 12:31:12 -04:00
parent 8d90b9f83f
commit cd33a61a87
4 changed files with 86 additions and 5 deletions

View File

@@ -50,11 +50,12 @@ krelease=`uname -r`
hostnm=`hostname`
#
# Tmux usually sets screen-256color which is unknown to most of systems I work
# with.
# If there is no terminal info in the system for current terminal but there is
# one in local terminfo then use it.
#
if [ "$TERM" == "screen-256color" ]; then
export TERM="xterm-256color"
/bin/tput -T $TERM longname 2>/dev/null >/dev/null
if [[ $? -ne 0 && -f $HOME/.terminfo/$kernel/${TERM:0:1}/$TERM ]]; then
export TERMINFO=$HOME/.terminfo/$kernel;
fi
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
@@ -68,7 +69,7 @@ elif [ $kernel == SunOS ]; then
fi
MYSCRIPTS=$HOME/devel/scripts
PATH=$MYLOCAL/bin:$PATH
PATH=$MYSCRIPTS/bash:$PATH
PATH=$MYSCRIPTS/bin:$PATH
#
# VIM