aboutsummaryrefslogtreecommitdiff
path: root/internal/p10k.zsh
diff options
context:
space:
mode:
authorromkatv <roman.perepelitsa@gmail.com>2019-06-18 10:59:27 +0300
committerromkatv <roman.perepelitsa@gmail.com>2019-06-18 10:59:27 +0300
commit95b25e94e190522ddc7128c1abfe1f6c2568fece (patch)
treece4a4c4a8b05393c2cd0edd86eadd42b900bfb61 /internal/p10k.zsh
parent76789306396a8289e63ab50cfad1c1e14b98fe86 (diff)
fix battery segment on macOS
issue #89
Diffstat (limited to 'internal/p10k.zsh')
-rwxr-xr-xinternal/p10k.zsh2
1 files changed, 1 insertions, 1 deletions
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="..."