mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-11-14 00:50:08 +00:00
fail more gracefully on timewarrior v3.0.1 (#2648)
This commit is contained in:
parent
178fcda348
commit
808ba80ab0
1 changed files with 3 additions and 1 deletions
|
@ -5264,7 +5264,9 @@ function _p9k_taskwarrior_init_data() {
|
|||
local -a ts
|
||||
ts=($(command task +PENDING -OVERDUE list rc.verbose=nothing rc.color=0 rc._forcecolor=0 \
|
||||
rc.report.list.labels= rc.report.list.columns=due.epoch </dev/null 2>/dev/null)) || ts=()
|
||||
if (( $#ts )); then
|
||||
# The second condition is a workaround for a bug in timewarrior v3.0.1.
|
||||
# https://github.com/romkatv/powerlevel10k/issues/2648.
|
||||
if (( $#ts && ! ${#${(@)ts:#(|-)<->(|.<->)}} )); then
|
||||
_p9k_taskwarrior_next_due=${${(on)ts}[1]}
|
||||
(( _p9k_taskwarrior_next_due > EPOCHSECONDS )) || _p9k_taskwarrior_next_due=$((EPOCHSECONDS+60))
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue