From 95b25e94e190522ddc7128c1abfe1f6c2568fece Mon Sep 17 00:00:00 2001 From: romkatv Date: Tue, 18 Jun 2019 09:59:27 +0200 Subject: [PATCH] fix battery segment on macOS issue #89 --- internal/p10k.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/p10k.zsh b/internal/p10k.zsh index 7ebe929b..3dbb0e7f 100755 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -426,7 +426,7 @@ prompt_battery() { case $OS in OSX) (( $+commands[pmset] )) || return - local raw_data=${${(f)$(command pmset -g batt 2>/dev/null)}[2]} + local raw_data=${${(f)"$(command pmset -g batt 2>/dev/null)"}[2]} [[ $raw_data == *InternalBattery* ]] || return remain=${${(s: :)${${(s:; :)raw_data}[3]}}[1]} [[ $remain == *no* ]] && remain="..."