diff --git a/commonsh/02_term b/commonsh/02_term index ef28517..99668dd 100755 --- a/commonsh/02_term +++ b/commonsh/02_term @@ -14,6 +14,16 @@ function fix_term () mlterm) fix_term kterm ;; + screen-256colors-bce) + fix_term screen-256colors + ;; + screen-256colors) + if (infocmp xterm-256colors &> /dev/null) ; then + fix_term xterm-256colors + else + fix_term screen + fi + ;; screen?*) fix_term screen ;; @@ -46,7 +56,8 @@ esac export TERM=$(fix_term $TERM) -if [[ $TERM == *256* ]] && (infocmp screen-256color-bce &> /dev/null) ; then - export SCREEN_COLOR="-256color" +if [[ $TERM == *256* ]] ; then + SCREEN_TERM=$(fix_term screen-256color-bce) + alias screen="screen -T ${SCREEN_TERM}" fi diff --git a/screenrc b/screenrc index 0104fbe..1b50d9f 100644 --- a/screenrc +++ b/screenrc @@ -25,9 +25,6 @@ defbce on # turn on utf8 defutf8 on -# set the term to 256 color, maybe -term "screen${SCREEN_COLOR}-bce" - # changes from the default binding " to `windowlist -b', so we don't create # a new empty window bind \" windowlist