Improve detection of xterm-256color and remove xterm+256color again

This commit is contained in:
Peter J. Holzer 2019-12-31 12:10:05 +01:00 committed by Peter J. Holzer
parent be8eb03364
commit 43ba5d2b5c
1 changed files with 11 additions and 8 deletions

View File

@ -23,21 +23,24 @@ then
stty erase 
fi
if [[ $TERM == xterm-256color && ! -f /usr/share/terminfo/x/xterm-256color ]]
if [[ $TERM == xterm-256color && ! -f /usr/share/terminfo/x/xterm-256color && ! -f /lib/terminfo/x/xterm-256color ]]
then
TERM=xterm
fi
if [[ $TERM == xterm ]]
then
for t in xterm-256color xterm+256color
for t in xterm-256color
do
if [[ -f /usr/share/terminfo/x/$t ]]
for d in /usr/share/terminfo/x /lib/terminfo/x
do
if [[ -f $d/$t ]]
then
TERM=$t
break
fi
done
done
fi
case "$TERM" in
@ -57,7 +60,7 @@ case "$TERM" in
;;
esac
if [[ $TERM = xterm || $TERM = xterm-256color || $TERM = xterm+256color ]]
if [[ $TERM = xterm || $TERM = xterm-256color ]]
then
if [ -f ~/.zxtermcolors ]
then