diff --git a/debian/changelog b/debian/changelog index 018649b4..4b40e1a0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,7 +1,9 @@ byobu (5.13) unreleased; urgency=low * usr/lib/byobu/include/mondrian: - - simply and speed up using perl + - simply speed up using perl + * usr/bin/byobu: LP: #937175 + - check tput for 256 color support before defaulting to that in tmux mode -- Dustin Kirkland Thu, 16 Feb 2012 23:58:36 -0600 diff --git a/usr/bin/byobu b/usr/bin/byobu index e1d981e8..d9e1ac6d 100755 --- a/usr/bin/byobu +++ b/usr/bin/byobu @@ -93,8 +93,12 @@ fi case $BYOBU_BACKEND in tmux) - # Use 256 colors, unless the user has overridden - [ -z "$SCREEN_TERM" ] && SCREEN_TERM="-2" + # Use 256 colors if possible + if command -v tput >/dev/null; then + if [ "$(tput colors 2>/dev/null || echo 0)" = "256" ]; then + [ -z "$SCREEN_TERM" ] && SCREEN_TERM="-2" + fi + fi PROFILE="-f $BYOBU_PREFIX/share/$PKG/profiles/tmuxrc" sessions=$($BYOBU_BACKEND list-sessions 2>/dev/null) || true ;;