usr/bin/byobu-status: save a conditional

This commit is contained in:
Dustin Kirkland 2010-06-24 11:42:09 -05:00
commit 70f4716ffc
2 changed files with 5 additions and 5 deletions

2
debian/changelog vendored
View file

@ -15,6 +15,8 @@ byobu (2.81) unreleased; urgency=low
- usr/bin/byobu-export - usr/bin/byobu-export
- usr/bin/byobu-janitor - usr/bin/byobu-janitor
* usr/bin/byobu-status: save a conditional
* usr/bin/byobu-config, usr/share/doc/byobu/help.txt: improve help * usr/bin/byobu-config, usr/share/doc/byobu/help.txt: improve help
text, per feedback from Turnkey Linux users text, per feedback from Turnkey Linux users

View file

@ -33,10 +33,8 @@ find_script () {
# Define colors # Define colors
ESC="\005" ESC="\005"
color() { color() {
if [ -z "$1" ] || [ "$COLOR" = "none" ]; then case "$1" in
return 0 "") return 0 ;;
fi
case $1 in
-) printf "$ESC{-}" ;; -) printf "$ESC{-}" ;;
esc) printf "$ESC" ;; esc) printf "$ESC" ;;
bold1) printf "$ESC{=b }" ;; bold1) printf "$ESC{=b }" ;;
@ -45,7 +43,7 @@ color() {
invert) printf "$ESC{=r }" ;; invert) printf "$ESC{=r }" ;;
*) *)
if [ "$#" = "2" ]; then if [ "$#" = "2" ]; then
[ "$MONOCHROME" = "1" ] && printf "$ESC{= }" || printf "$ESC{= $1$2}" [ "$MONOCHROME" = "1" ] && printf "$ESC{= }" || printf "$ESC{= $1$2}"
else else
[ "$MONOCHROME" = "1" ] && printf "$ESC{=$1 }" || printf "$ESC{=$1 $2$3}" [ "$MONOCHROME" = "1" ] && printf "$ESC{=$1 }" || printf "$ESC{=$1 $2$3}"
fi fi