diff options
author | rjorgenson <rjorgenson@gmail.com> | 2016-01-14 21:07:11 +0300 |
---|---|---|
committer | rjorgenson <rjorgenson@gmail.com> | 2016-01-14 21:07:11 +0300 |
commit | e29b3545bd4dc22f874347df9eb296e62105b94e (patch) | |
tree | 8cf164b2bb96195fb0aef216bcb6bb9b0f29d962 /powerlevel9k.zsh-theme | |
parent | 9aeff8d43bd8ad95d913b21e68a5aa64036eda45 (diff) |
fixed called to ioreg on OS X machines
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rwxr-xr-x | powerlevel9k.zsh-theme | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme index ab942d5b..451d1b6f 100755 --- a/powerlevel9k.zsh-theme +++ b/powerlevel9k.zsh-theme @@ -312,7 +312,7 @@ prompt_battery() { if [[ $OS =~ OSX && -f /usr/sbin/ioreg && -x /usr/sbin/ioreg ]]; then # Pre-Grep as much information as possible to save some memory and # avoid pollution of the xtrace output. - local raw_data=$(ioreg -n AppleSmartBattery | grep -E "MaxCapacity|TimeRemaining|CurrentCapacity|ExternalConnected|IsCharging") + local raw_data="$(ioreg -n AppleSmartBattery | grep -E "MaxCapacity|TimeRemaining|CurrentCapacity|ExternalConnected|IsCharging")" # return if there is no battery on system [[ -z $(echo $raw_data | grep MaxCapacity) ]] && return |