mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-12-18 21:41:57 +00:00
parent
7678930639
commit
95b25e94e1
1 changed files with 1 additions and 1 deletions
|
@ -426,7 +426,7 @@ prompt_battery() {
|
||||||
case $OS in
|
case $OS in
|
||||||
OSX)
|
OSX)
|
||||||
(( $+commands[pmset] )) || return
|
(( $+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
|
[[ $raw_data == *InternalBattery* ]] || return
|
||||||
remain=${${(s: :)${${(s:; :)raw_data}[3]}}[1]}
|
remain=${${(s: :)${${(s:; :)raw_data}[3]}}[1]}
|
||||||
[[ $remain == *no* ]] && remain="..."
|
[[ $remain == *no* ]] && remain="..."
|
||||||
|
|
Loading…
Reference in a new issue