Skip to content

Commit

Permalink
escape IFS character
Browse files Browse the repository at this point in the history
  • Loading branch information
rotoni committed Dec 17, 2020
1 parent 298693e commit 4ebc26e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion liquidprompt
Original file line number Diff line number Diff line change
Expand Up @@ -1955,7 +1955,7 @@ case "$LP_OS" in
_lp_battery() {
(( LP_ENABLE_BATT )) || return 5
local percent batt_status
IFS=; read -r lp_battery batt_status <<<"$(pmset -g batt | sed -n 's/^ -InternalBattery.*[[:space:]]\([0-9]*[0-9]\)%; \([^;]*\).*$/\1;\2/p')"
IFS=';' read -r lp_battery batt_status <<<"$(pmset -g batt | sed -n 's/^ -InternalBattery.*[[:space:]]\([0-9]*[0-9]\)%; \([^;]*\).*$/\1;\2/p')"
case "$batt_status" in
charged | "")
return 4
Expand Down

0 comments on commit 4ebc26e

Please sign in to comment.