summaryrefslogtreecommitdiff
path: root/internal/p10k.zsh
diff options
context:
space:
mode:
Diffstat (limited to 'internal/p10k.zsh')
-rwxr-xr-xinternal/p10k.zsh3
1 files changed, 1 insertions, 2 deletions
diff --git a/internal/p10k.zsh b/internal/p10k.zsh
index c7cc6c4d..87496aa0 100755
--- a/internal/p10k.zsh
+++ b/internal/p10k.zsh
@@ -792,8 +792,7 @@ prompt_battery() {
if (( $#POWERLEVEL9K_BATTERY_STAGES )); then
local -i idx=$#POWERLEVEL9K_BATTERY_STAGES
(( bat_percent < 100 )) && idx=$((bat_percent * $#POWERLEVEL9K_BATTERY_STAGES / 100 + 1))
- icon+=_$idx
- typeset -g POWERLEVEL9K_$icon=$POWERLEVEL9K_BATTERY_STAGES[idx]
+ icon=$'\1'${(g::)POWERLEVEL9K_BATTERY_STAGES[idx]}
fi
local bg=$DEFAULT_COLOR