Fix windows displaying a blank battery output when no battery is found

This commit is contained in:
Dylan 2016-03-27 15:05:43 +11:00
parent 3496c85248
commit 8298f64394

View file

@ -1603,7 +1603,8 @@ getbattery () {
battery=${battery/EstimatedChargeRemaining'='}
battery=${battery//[[:space:]]/ }
battery=${battery// }
battery+="%"
[ ! -z "$battery" ] && \
battery+="%"
;;
esac