mirror of
https://github.com/NaomiAmethyst/dots.git
synced 2025-04-13 09:30:06 +00:00
only do terminal magic if we have infocmp
This commit is contained in:
parent
10d017a3c0
commit
c04f430760
1 changed files with 28 additions and 26 deletions
|
@ -48,32 +48,34 @@ fix_terminfo_db ()
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# terminal surgery
|
if ( command -v infocmp >/dev/null 2>&1 ) ; then
|
||||||
case `uname -s` in
|
# terminal surgery
|
||||||
Interix)
|
case `uname -s` in
|
||||||
fix_terminfo_db "/usr/local"
|
Interix)
|
||||||
;;
|
fix_terminfo_db "/usr/local"
|
||||||
SunOS)
|
;;
|
||||||
fix_terminfo_db "/opt/csw"
|
SunOS)
|
||||||
;;
|
fix_terminfo_db "/opt/csw"
|
||||||
Darwin)
|
;;
|
||||||
fix_terminfo_db "/opt/local"
|
Darwin)
|
||||||
;;
|
fix_terminfo_db "/opt/local"
|
||||||
esac
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
TERM=`fix_term $TERM`
|
TERM=`fix_term $TERM`
|
||||||
|
|
||||||
# I am sorry to hear that you are running an
|
# I am sorry to hear that you are running an
|
||||||
# xterm that has no colors (I am looking at you solaris)
|
# xterm that has no colors (I am looking at you solaris)
|
||||||
if [ $TERM = xterm ] && ( command -v tput >/dev/null 2>&1 ) && [ `tput -T xterm colors` = -1 ] ; then
|
if [ $TERM = xterm ] && ( command -v tput >/dev/null 2>&1 ) && [ `tput -T xterm colors` = -1 ] ; then
|
||||||
# lets see what we can do about your terrible term
|
# lets see what we can do about your terrible term
|
||||||
TERM=`fix_term xterm-color`
|
TERM=`fix_term xterm-color`
|
||||||
|
fi
|
||||||
|
|
||||||
|
export TERM
|
||||||
|
|
||||||
|
case $TERM in
|
||||||
|
*256*)
|
||||||
|
alias screen="screen -T `fix_term screen-256color-bce`"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
export TERM
|
|
||||||
|
|
||||||
case $TERM in
|
|
||||||
*256*)
|
|
||||||
alias screen="screen -T `fix_term screen-256color-bce`"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue