From d7577da69d99d49d86e2c088540df8c78650ff83 Mon Sep 17 00:00:00 2001 From: Dustin Kirkland Date: Thu, 7 May 2009 13:28:19 -0500 Subject: [PATCH] * byobu-status: print the short description (matching the status in the lower bar) first, then the description in parens Signed-off-by: Dustin Kirkland --- byobu-status | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/byobu-status b/byobu-status index 8b7557b3..4159d550 100755 --- a/byobu-status +++ b/byobu-status @@ -75,10 +75,9 @@ case "$P" in printf "\n" for i in `ls "$DIR"`; do [ "$i" = "menu" ] && continue - short=`"$DIR"/$i --short | sed 's/ $//' | sed 's/.{[^}]*}//g' | sed 's/^/\t/g'` || true + short=`"$DIR"/$i --short | sed 's/^\s*//' | sed 's/\s*$//' | sed 's/.{[^}]*}//g'` || true detail=`"$DIR"/$i --detail | sed '/^$/d' | sed 's/^/\t/g'` || true - printf "%-20s - %s\n" "$i" "$short" - [ -n "$short" ] && printf "%s\n" "$short" + printf "%-15s (%s)\n" "$short" "$i" [ -n "$detail" ] && printf "%s\n" "$detail" done exit 0