]> git.rmz.io Git - dotfiles.git/blob - zsh/lib/50-taskwarrior.zsh
ce423cff03e21f842262561667c7f7b0e6246618
[dotfiles.git] / zsh / lib / 50-taskwarrior.zsh
1 if (( ! $+commands[task] )); then
2 return 1
3 fi
4
5 alias t="noglob task"
6 alias tt="task today"
7 alias tlatest="t +LATEST"
8 alias in="noglob task add +in"
9 alias inn="in rc.context=none"
10 alias tw="task context wfh"
11 alias th="task context home"
12
13 autoload -Uz task-quote-magic
14 zle -N self-insert task-quote-magic
15
16 function tparent() {
17 # TODO: check args
18 task _get $1.rparent
19 }
20
21 function task_today_list() {
22 local task_cmd=(task rc.verbose:nothing)
23 local task_count=$($task_cmd $($task_cmd _get rc.report.today.filter) count)
24
25 local task_status=""
26 task_status+="%{$fg_bold[red]%} $task_count "
27 task_status+="%{$reset_color%}"
28 echo $task_status
29 }