X-Git-Url: https://git.rmz.io/dotfiles.git/blobdiff_plain/b0876bc435231da3f114277d8f88a2237d0b49e8..90b52499ab45396542fbbe9f0be06cbf3c1c1a3d:/zsh/lib/50-taskwarrior.zsh?ds=inline diff --git a/zsh/lib/50-taskwarrior.zsh b/zsh/lib/50-taskwarrior.zsh index ce423cf..84ee1ff 100644 --- a/zsh/lib/50-taskwarrior.zsh +++ b/zsh/lib/50-taskwarrior.zsh @@ -2,14 +2,18 @@ if (( ! $+commands[task] )); then return 1 fi -alias t="noglob task" +alias task="noglob task" +alias t="task" alias tt="task today" -alias tlatest="t +LATEST" -alias in="noglob task add +in" + +alias in="task add +in" alias inn="in rc.context=none" + alias tw="task context wfh" alias th="task context home" +alias tlatest="t +LATEST" + autoload -Uz task-quote-magic zle -N self-insert task-quote-magic @@ -18,6 +22,17 @@ function tparent() { task _get $1.rparent } +function tick() { + # TODO: have duration as an option to allow multiple filter + if (( # < 1 || # > 2)); then + print >&2 "Usage: $0 [duration]" + return 1 + fi + task $1 mod wait:${2:-1h} +} + +# TODO: function to show the latest report + function task_today_list() { local task_cmd=(task rc.verbose:nothing) local task_count=$($task_cmd $($task_cmd _get rc.report.today.filter) count)