diff --git a/debian/changelog b/debian/changelog index bd19a22c..ac804c33 100644 --- a/debian/changelog +++ b/debian/changelog @@ -18,6 +18,8 @@ byobu (5.8) unreleased; urgency=low - do a better job counting ssh users * usr/share/byobu/status/status: - move wifi_quality to second right status + * usr/bin/byobu-status, usr/lib/byobu/include/constants: + - use printf instead of echo, saves a few forks -- Dustin Kirkland Mon, 30 Jan 2012 18:12:49 -0600 diff --git a/usr/bin/byobu-status b/usr/bin/byobu-status index 1cae24b5..86f8c6ad 100755 --- a/usr/bin/byobu-status +++ b/usr/bin/byobu-status @@ -69,10 +69,10 @@ get_status() { # Update cache now, if necessary if [ $NOW -ge $expiry ] || [ "$lastrun" = "0" ]; then "__$function" > "$cachepath" - echo "$NOW" > "$lastpath" + printf "%s" "$NOW" > "$lastpath" fi if [ -s "$cachepath" ]; then - IFS= read line < "$cachepath"; printf "$line" + IFS= read line < "$cachepath"; printf "%s" "$line" fi } @@ -87,7 +87,7 @@ case "$1" in --detail) VER= if command -v dpkg-query >/dev/null; then - VER=$(set -- $(dpkg-query --show $PKG); echo "$2") + VER=$(set -- $(dpkg-query --show $PKG); printf "%s\n" "$2") fi printf "$PKG-$VER Detailed Status Navigation\n" if command -v vim >/dev/null && `vim --version | grep -q +folding`; then diff --git a/usr/lib/byobu/include/constants b/usr/lib/byobu/include/constants index 1d6abce2..3ff3e7a5 100755 --- a/usr/lib/byobu/include/constants +++ b/usr/lib/byobu/include/constants @@ -73,7 +73,7 @@ else ICON_GHz="GHz" ICON_MBPS="Mbps" fi -PCT="%%" +PCT="%" # Support two different backends (screen/tmux) if [ -z "$BYOBU_BACKEND" ]; then