From 4a3de0c8aeba6b8c83b2762cf6e9a1bd06674098 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Mon, 13 Jun 2016 20:40:31 +1000 Subject: [PATCH] Fixed whitespace for realsies this time --- neofetch | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/neofetch b/neofetch index d349495d..53193a08 100755 --- a/neofetch +++ b/neofetch @@ -1177,6 +1177,7 @@ getcpu_usage () { "Windows") cpu_usage="$(wmic cpu get loadpercentage /value)" cpu_usage="${cpu_usage/LoadPercentage'='}" + cpu_usage="${cpu_usage// }" ;; "BSD") @@ -2799,10 +2800,12 @@ getlinebreak () { # # The 'set -f/+f' is here so that 'echo' doesn't cause any expansion # of special characters. +# +# The whitespace trim doesn't work with multiline strings so we use +# '${1//[[:space:]]/ }' to remove newlines beofre we trim the whitespace. trim() { set -f - builtin echo -En ${1// -} + builtin echo -E ${1//[[:space:]]/ } set +f }