Battery: Fix % sign when no battery detected on Windows

This commit is contained in:
Dylan Araps 2016-12-18 23:23:58 +11:00
parent 63529ddebf
commit 976ae0090f
1 changed files with 1 additions and 1 deletions

View File

@ -1616,7 +1616,7 @@ get_battery() {
"Windows")
battery="$(wmic Path Win32_Battery get EstimatedChargeRemaining /value)"
battery="${battery/EstimatedChargeRemaining'='}"
[[ "$battery" ]] && battery+="%"
[[ "$(trim "$battery")" ]] && battery="%"
;;
"Haiku")