fix screen on terminals with 256 color when the screen is not compiled with 256 color support

This commit is contained in:
David Majnemer 2008-12-24 23:48:42 -05:00
parent 28abafcf9d
commit 1382c16893
2 changed files with 2 additions and 6 deletions

View file

@ -19,9 +19,6 @@ nethack on
# mess with bold
attrcolor b ".I"
# get screen to go for 256 colors
termcapinfo xterm-256color 'Co#256'
# erase background with current bg color
defbce on

5
zshrc
View file

@ -101,7 +101,6 @@ function fix_terminfo_db
{
if [[ `which infocmp` = "$1/bin/infocmp" ]] ; then
export TERMINFO="$1/share/terminfo"
export TERM=$TERM
fi
}
@ -155,7 +154,7 @@ esac
export TERM=$(fix_term $TERM)
if [[ $TERM == *256* ]] ; then
if [[ $TERM == *256* ]] && (infocmp screen-256color-bce &> /dev/null) ; then
export SCREEN_COLOR="-256color"
fi
@ -213,7 +212,7 @@ case $TERM in
bindkey '\e[1;5D' emacs-backward-word
bindkey '\e[3~' delete-char
;;
linux)
linux|vt100)
bindkey '\e[1~' beginning-of-line
bindkey '\e[4~' end-of-line
bindkey '\e[3~' delete-char