aboutsummaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
authorromkatv <roman.perepelitsa@gmail.com>2020-02-27 17:25:36 +0300
committerromkatv <roman.perepelitsa@gmail.com>2020-02-27 17:25:36 +0300
commit56060f0bc1486ec953406efa9427c2015c4b39e6 (patch)
tree431e8a9bd61a820fccb2161d623885b0045c59cf /internal
parentbd921485fc9363bc415ff61baa97d09c6d5546e0 (diff)
don't assume that zero size of a file in /sys actually means it's empty
Diffstat (limited to 'internal')
-rw-r--r--internal/p10k.zsh2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/p10k.zsh b/internal/p10k.zsh
index 6453656e..d94856dc 100644
--- a/internal/p10k.zsh
+++ b/internal/p10k.zsh
@@ -1252,7 +1252,7 @@ _p9k_prompt_battery_init() {
return
fi
if [[ $_p9k_os != (Linux|Android) ||
- -z /sys/class/power_supply/(BAT*|battery)/(energy_full|charge_full|charge_counter)(#qL+0N) ]]; then
+ -z /sys/class/power_supply/(BAT*|battery)/(energy_full|charge_full|charge_counter)(#qN) ]]; then
typeset -g "_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]"='${:-}'
fi
}