aboutsummaryrefslogtreecommitdiff
path: root/powerlevel9k.zsh-theme
diff options
context:
space:
mode:
authorDean Fenster <dean.fenster@gmail.com>2016-12-08 22:06:07 +0300
committerDean Fenster <dean.fenster@gmail.com>2016-12-08 22:06:07 +0300
commitb37090073c5ad491d7f70803e7f06168471b3148 (patch)
treed099014d706dde4fd08c5cfa18a7d86f9d1947fc /powerlevel9k.zsh-theme
parenta637321d58935d4dc4ee25e97c7a2ee02f7c8387 (diff)
Supressed error message for invalid acpi date (happens when disconnecting the power cable)
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rwxr-xr-xpowerlevel9k.zsh-theme2
1 files changed, 1 insertions, 1 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme
index c21d0b43..d56e46f4 100755
--- a/powerlevel9k.zsh-theme
+++ b/powerlevel9k.zsh-theme
@@ -412,7 +412,7 @@ prompt_battery() {
if [[ $time_remaining =~ rate ]]; then
local tstring="..."
elif [[ $time_remaining =~ "[:digit:]+" ]]; then
- local tstring=${(f)$(date -u -d "$(echo $time_remaining)" +%k:%M)}
+ local tstring=${(f)$(date -u -d "$(echo $time_remaining)" +%k:%M 2> /dev/null)}
fi
fi
[[ -n $tstring ]] && local remain=" ($tstring)"