mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2025-01-19 04:47:40 +02:00
Supressed error message for invalid acpi date (happens when disconnecting the power cable)
This commit is contained in:
parent
a637321d58
commit
b37090073c
@ -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)"
|
||||
|
Loading…
x
Reference in New Issue
Block a user