Improve detection of xterm-256color and remove xterm+256color again
This commit is contained in:
parent
be8eb03364
commit
43ba5d2b5c
11
.znewterm
11
.znewterm
|
@ -23,21 +23,24 @@ then
|
||||||
stty erase
|
stty erase
|
||||||
fi
|
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
|
then
|
||||||
TERM=xterm
|
TERM=xterm
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $TERM == xterm ]]
|
if [[ $TERM == xterm ]]
|
||||||
then
|
then
|
||||||
for t in xterm-256color xterm+256color
|
for t in xterm-256color
|
||||||
do
|
do
|
||||||
if [[ -f /usr/share/terminfo/x/$t ]]
|
for d in /usr/share/terminfo/x /lib/terminfo/x
|
||||||
|
do
|
||||||
|
if [[ -f $d/$t ]]
|
||||||
then
|
then
|
||||||
TERM=$t
|
TERM=$t
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
case "$TERM" in
|
case "$TERM" in
|
||||||
|
@ -57,7 +60,7 @@ case "$TERM" in
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if [[ $TERM = xterm || $TERM = xterm-256color || $TERM = xterm+256color ]]
|
if [[ $TERM = xterm || $TERM = xterm-256color ]]
|
||||||
then
|
then
|
||||||
if [ -f ~/.zxtermcolors ]
|
if [ -f ~/.zxtermcolors ]
|
||||||
then
|
then
|
||||||
|
|
Loading…
Reference in New Issue