mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2026-09-18 00:10:08 +00:00
+1
-1
@@ -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="..."
|
||||
|
||||
Reference in New Issue
Block a user