From ac94c8d82c5355d25505542cc216671bd4092b4a Mon Sep 17 00:00:00 2001 From: Dustin Kirkland Date: Fri, 30 Aug 2013 17:24:32 -0700 Subject: [PATCH] * usr/bin/byobu, usr/share/byobu/profiles/bashrc: - try to ensure that 256 colors stick, per feedback from Josh Poulson in G+ --- debian/changelog | 4 +++- usr/bin/byobu | 2 +- usr/share/byobu/profiles/bashrc | 6 ++++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 534f8f5f..aa13101b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,8 @@ byobu (5.57) unreleased; urgency=low - * UNRELEASED + * usr/bin/byobu, usr/share/byobu/profiles/bashrc: + - try to ensure that 256 colors stick, per feedback from Josh + Poulson in G+ -- Dustin Kirkland Fri, 16 Aug 2013 16:29:11 -0500 diff --git a/usr/bin/byobu b/usr/bin/byobu index 1cefd6d2..de6cca76 100755 --- a/usr/bin/byobu +++ b/usr/bin/byobu @@ -103,7 +103,7 @@ case $BYOBU_BACKEND in tmux) # Use 256 colors if possible if $BYOBU_TEST tput >/dev/null; then - if [ "$(tput colors 2>/dev/null || echo 0)" = "256" ] || [ "$COLORTERM" = "gnome-terminal" ] || [ "$TERM" = "xterm" ]; then + if [ "$(tput colors 2>/dev/null || echo 0)" = "256" ] || [ "$COLORTERM" = "gnome-terminal" ] || [ "$TERM" = "xterm" ] || [ "$TERM" = "xterm-256color" ]; then [ -z "$SCREEN_TERM" ] && SCREEN_TERM="-2" fi fi diff --git a/usr/share/byobu/profiles/bashrc b/usr/share/byobu/profiles/bashrc index 1fac63fc..70af8f85 100644 --- a/usr/share/byobu/profiles/bashrc +++ b/usr/share/byobu/profiles/bashrc @@ -16,6 +16,12 @@ # along with this program. If not, see . # Ensure that we're in a tmux or screen session +case "$TERM" in + xterm) + # Try to ensure we have 256 colors + export TERM="xterm-256color" + ;; +esac if [ -n "$TMUX" ] || [ "${TERMCAP#*screen}" != "${TERMCAP}" ]; then # Ensure that we're in bash, in a byobu environment if [ -n "$BYOBU_BACKEND" ] && [ "$SHELL" = "/bin/bash" ]; then