From 70f4716ffcbc12d37b8442f397d80959b2da215b Mon Sep 17 00:00:00 2001 From: Dustin Kirkland Date: Thu, 24 Jun 2010 11:42:09 -0500 Subject: [PATCH] usr/bin/byobu-status: save a conditional --- debian/changelog | 2 ++ usr/bin/byobu-status | 8 +++----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/debian/changelog b/debian/changelog index 6c390975..c2fc707a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -15,6 +15,8 @@ byobu (2.81) unreleased; urgency=low - usr/bin/byobu-export - usr/bin/byobu-janitor + * usr/bin/byobu-status: save a conditional + * usr/bin/byobu-config, usr/share/doc/byobu/help.txt: improve help text, per feedback from Turnkey Linux users diff --git a/usr/bin/byobu-status b/usr/bin/byobu-status index 03e575f6..8d3ce92b 100755 --- a/usr/bin/byobu-status +++ b/usr/bin/byobu-status @@ -33,10 +33,8 @@ find_script () { # Define colors ESC="\005" color() { - if [ -z "$1" ] || [ "$COLOR" = "none" ]; then - return 0 - fi - case $1 in + case "$1" in + "") return 0 ;; -) printf "$ESC{-}" ;; esc) printf "$ESC" ;; bold1) printf "$ESC{=b }" ;; @@ -45,7 +43,7 @@ color() { invert) printf "$ESC{=r }" ;; *) if [ "$#" = "2" ]; then - [ "$MONOCHROME" = "1" ] && printf "$ESC{= }" || printf "$ESC{= $1$2}" + [ "$MONOCHROME" = "1" ] && printf "$ESC{= }" || printf "$ESC{= $1$2}" else [ "$MONOCHROME" = "1" ] && printf "$ESC{=$1 }" || printf "$ESC{=$1 $2$3}" fi