Compare commits

...

6 Commits

Author SHA1 Message Date
Peter J. Holzer 026e709be0 Merge branch 'hjp' of git.hjp.at:hjp/dot into hjp 2020-02-29 16:41:20 +01:00
Peter J. Holzer 2b875f67e6 Merge branch 'master' into hjp 2020-02-28 11:15:50 +01:00
Peter J. Holzer 4717013939 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.
2020-02-28 10:49:11 +01:00
Peter J. Holzer be8eb03364 Accept xterm+256colors as an xterm variant 2019-12-31 11:51:20 +01:00
Peter J. Holzer d5dafc5cc4 Merge branch 'master' into hjp 2019-12-27 20:10:16 +01:00
Peter J. Holzer 9a1b52eee2 Assume xterm has 256 colors 2019-12-27 20:08:53 +01:00
1 changed files with 16 additions and 1 deletions

View File

@ -23,11 +23,26 @@ 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
do
for dir in /usr/share/terminfo/x /lib/terminfo/x/
do
if [[ -f $dir/$t ]]
then
TERM=$t
break 2
fi
done
done
fi
case "$TERM" in
xterm*|screen)
# indicated exit status by smiley (suggested by Stig Sandbeck Mathisen)