1
0
Fork 0
mirror of https://github.com/romkatv/powerlevel10k.git synced 2024-11-16 17:50:09 +00:00

Supressed error message for invalid acpi date (happens when disconnecting the power cable)

This commit is contained in:
Dean Fenster 2016-12-08 21:06:07 +02:00
parent a637321d58
commit b37090073c

View file

@ -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)"