* byobu-status: print the short description (matching the status

in the lower bar) first, then the description in parens


Signed-off-by: Dustin Kirkland <kirkland@canonical.com>
This commit is contained in:
Dustin Kirkland 2009-05-07 13:28:19 -05:00
commit d7577da69d

View file

@ -75,10 +75,9 @@ case "$P" in
printf "\n" printf "\n"
for i in `ls "$DIR"`; do for i in `ls "$DIR"`; do
[ "$i" = "menu" ] && continue [ "$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 detail=`"$DIR"/$i --detail | sed '/^$/d' | sed 's/^/\t/g'` || true
printf "%-20s - %s\n" "$i" "$short" printf "%-15s (%s)\n" "$short" "$i"
[ -n "$short" ] && printf "%s\n" "$short"
[ -n "$detail" ] && printf "%s\n" "$detail" [ -n "$detail" ] && printf "%s\n" "$detail"
done done
exit 0 exit 0