Remove xterm+256color again but check /lib/terminfo
The terminal defintions with a + are just building blocks, not full definitions. We can't use them. OTOH, the definitions in /lib/terminfo seem to work fine in current Debian and Ubuntu versions (which is what I care about these days), so we accept them.
This commit is contained in:
parent
be8eb03364
commit
4717013939
19
.znewterm
19
.znewterm
|
@ -23,20 +23,23 @@ 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 ]]
|
||||
then
|
||||
TERM=$t
|
||||
break
|
||||
fi
|
||||
for dir in /usr/share/terminfo/x /lib/terminfo/x/
|
||||
do
|
||||
if [[ -f $dir/$t ]]
|
||||
then
|
||||
TERM=$t
|
||||
break 2
|
||||
fi
|
||||
done
|
||||
done
|
||||
fi
|
||||
|
||||
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue