From 1dbeabb5e8e75e9a975d96f13e895cbb9edb88c1 Mon Sep 17 00:00:00 2001 From: Dustin Kirkland Date: Tue, 4 Oct 2011 09:46:00 -0400 Subject: [PATCH] - fix broken 256-color detection, use it by default, allow override * usr/bin/byobu: --- debian/changelog | 2 ++ usr/bin/byobu | 10 +++------- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/debian/changelog b/debian/changelog index 0daf7b36..fbf38185 100644 --- a/debian/changelog +++ b/debian/changelog @@ -11,6 +11,7 @@ byobu (4.38) unreleased; urgency=low - get next/prev split working with c-f3/c-f4 and s-f3/s-f4 - default mode keys to vi (to match screen/byobu) - explicitly set a couple of colors, highlight active pane a bit + - fix broken 256-color detection, use it by default, allow override * usr/lib/byobu/distro, usr/lib/byobu/Makefile.am, usr/lib/byobu/release, usr/lib/byobu/.shutil, usr/share/byobu/status/status, usr/share/man/man1/byobu.1: @@ -20,6 +21,7 @@ byobu (4.38) unreleased; urgency=low * usr/lib/byobu/raid: - fix raid rebuild percentage formatting * usr/share/byobu/profiles/tmux: + * usr/bin/byobu: -- Dustin Kirkland Thu, 29 Sep 2011 14:46:58 -0400 diff --git a/usr/bin/byobu b/usr/bin/byobu index d323c26f..69659db3 100755 --- a/usr/bin/byobu +++ b/usr/bin/byobu @@ -72,12 +72,8 @@ fi case $BYOBU_BACKEND in tmux) - # Check if our terminfo supports 256 colors - if command -v tput >/dev/null; then - if [ "$(tput colors 2>/dev/null || echo 0)" = "256" ]; then - export TERM="screen-256color" - fi - fi + # Use 256 colors, unless the user has overridden + [ -z "$SCREEN_TERM" ] && SCREEN_TERM="-2" PROFILE="-f $BYOBU_PREFIX/share/$PKG/profiles/tmuxrc" ;; *) @@ -99,7 +95,7 @@ case $BYOBU_BACKEND in # Check if our terminfo supports 256 colors if command -v tput >/dev/null; then if [ "$(tput colors 2>/dev/null || echo 0)" = "256" ]; then - export SCREEN_TERM="-T screen-256color" + SCREEN_TERM="-T screen-256color" fi fi # Some users want to maintain separate configurations