1 if (( ! $
+commands
[task
] )); then
5 alias task
="noglob task"
9 alias in="task add +in"
10 alias inn
="in rc.context=none"
12 alias tw
="task context wfh"
13 alias th
="task context home"
15 alias tlatest
="t +LATEST"
17 autoload
-Uz task-quote-magic
18 zle
-N self-insert task-quote-magic
26 # TODO: have duration as an option to allow multiple filter
27 if (( # < 1 || # > 2)); then
28 print
>&2 "Usage: $0 <filter> [duration]"
31 task
$1 mod
wait:${2:-1h}
35 local context
=$
(task _get rc.context
)
36 local context_read
=$
(task _get rc.context.
$context.
read)
37 local urg_task
=$
(task
+READY
$context_read _urgency
| sort -k4 -n | tail -1 | cut
-d" " -f2)
42 # Taken from https://cs-syd.eu/posts/2015-07-05-gtd-with-taskwarrior-part-4-processing
44 title
=$
(curl
--silent "$link" | htmlq
--text title
)
46 task add
+in +rnr
$descr
47 task
+LATEST annotate
"$link"
50 # TODO: function to show the latest report
52 function task_today_list
() {
53 local task_cmd
=(task rc.verbose
:nothing
)
54 local task_count
=$
($task_cmd $
($task_cmd _get rc.report.today.filter
) count
)
57 task_status
+="%{$fg_bold[red]%} $task_count "
58 task_status
+="%{$reset_color%}"