From a69b86a22a3794a4335a7b62ad049e1f73688919 Mon Sep 17 00:00:00 2001 From: Dylan Date: Sat, 6 Feb 2016 01:04:41 +1100 Subject: [PATCH] Fix battery showing no info in stdout mode --- fetch | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/fetch b/fetch index 80e901d4..4ac40438 100755 --- a/fetch +++ b/fetch @@ -1857,7 +1857,11 @@ prin () { ;; esac - printf "%b%s\n" "${padding}${string}${clear}" + # Print the info + printf "%b%s" "${padding}${string}${clear}" + + # If stdout mode is off, print a newline too. + [ "$stdout" == "off" ] && printf "\n" } # }}} @@ -2196,7 +2200,7 @@ while [ "$1" ]; do eval output="\$${func}" # Print the output - printf "%s" "$output" + printf "%s" "${output}" ;; esac done