mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2026-09-29 00:04:36 +00:00
Supressed error message for invalid acpi date (happens when disconnecting the power cable)
This commit is contained in:
@@ -412,7 +412,7 @@ prompt_battery() {
|
|||||||
if [[ $time_remaining =~ rate ]]; then
|
if [[ $time_remaining =~ rate ]]; then
|
||||||
local tstring="..."
|
local tstring="..."
|
||||||
elif [[ $time_remaining =~ "[:digit:]+" ]]; then
|
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
|
||||||
fi
|
fi
|
||||||
[[ -n $tstring ]] && local remain=" ($tstring)"
|
[[ -n $tstring ]] && local remain=" ($tstring)"
|
||||||
|
|||||||
Reference in New Issue
Block a user