summaryrefslogtreecommitdiff
path: root/powerlevel9k.zsh-theme
diff options
context:
space:
mode:
authorruifeng.shan <ruifeng.shan@qunar.com>2016-06-17 13:08:39 +0300
committerBen Hilburn <bhilburn@gmail.com>2016-07-07 20:02:16 +0300
commitd7c449be34ffdd3449a7e984442fcc5d9552154e (patch)
tree3c9dc790d121ba850b622b91358fc6417205c45f /powerlevel9k.zsh-theme
parent20b4d2b43e91c2e347eed057acb62269d66aac25 (diff)
revise mac battery error when mac default date use linux's
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rwxr-xr-xpowerlevel9k.zsh-theme3
1 files changed, 2 insertions, 1 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme
index 088a7372..8fa623a1 100755
--- a/powerlevel9k.zsh-theme
+++ b/powerlevel9k.zsh-theme
@@ -360,7 +360,7 @@ prompt_battery() {
local time_remaining=$(echo $raw_data | grep TimeRemaining | awk '{ print $5 }')
if [[ -n $time_remaining ]]; then
# this value is set to a very high number when the system is calculating
- [[ $time_remaining -gt 10000 ]] && local tstring="..." || local tstring=${(f)$(date -u -r $(($time_remaining * 60)) +%k:%M)}
+ [[ $time_remaining -gt 10000 ]] && local tstring="..." || local tstring=${(f)$(/bin/date -u -r $(($time_remaining * 60)) +%k:%M)}
fi
# Get charge values
@@ -1088,3 +1088,4 @@ powerlevel9k_init() {
}
powerlevel9k_init "$@"
+