* usr/bin/byobu, usr/share/byobu/profiles/bashrc:

- try to ensure that 256 colors stick, per feedback from Josh
    Poulson in G+
This commit is contained in:
Dustin Kirkland 2013-08-30 17:24:32 -07:00
commit ac94c8d82c
3 changed files with 10 additions and 2 deletions

4
debian/changelog vendored
View file

@ -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 <kirkland@ubuntu.com> Fri, 16 Aug 2013 16:29:11 -0500

View file

@ -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

View file

@ -16,6 +16,12 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# 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