From cfddecba60700300bd723afc02f672d6af37151b Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Thu, 8 Dec 2022 12:18:00 +0100 Subject: [PATCH] task: Add aliases for frequent commands Added aliases for task adding (`ta`), logging (`tal`), annotating (`tan`); listing next upcoming (`tn`), listing next urgent (`tun`); showing active (`tra`) and getting a report of recently (1 week) completed (`trw`) and, finally, `to` to invoke taskopen on the task passed in. --- taskwarrior/.config/sh/alias.d/taskwarrior.sh | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/taskwarrior/.config/sh/alias.d/taskwarrior.sh b/taskwarrior/.config/sh/alias.d/taskwarrior.sh index 3567a8b..4d026cf 100644 --- a/taskwarrior/.config/sh/alias.d/taskwarrior.sh +++ b/taskwarrior/.config/sh/alias.d/taskwarrior.sh @@ -1,7 +1,5 @@ #!/usr/bin/env sh -alias taskopen='taskopen --config=${XDG_CONFIG_HOME:-~/.config}/task/taskopenrc' - # invoking t starts the task shell # passing arguments along passes them straight through to taskwarrior instead t() { @@ -17,3 +15,18 @@ t() { # this is not very pretty and not super portable (needs ps) but # works for now. from here: https://unix.stackexchange.com/a/72564/414758 if [ "$(ps -p $$ -o comm --no-headers)" = "zsh" ]; then compdef t=task; fi + +# Make taskopen XDG conforming. If changing here, also change in taskrc alias. +alias taskopen='taskopen --config=${XDG_CONFIG_HOME:-~/.config}/task/taskopenrc' + +alias ta="task add" +alias tal="task log" +alias tan="task annotate" + +alias tn="task next +READY" +alias tun="task next urgency \> 4" + +alias tra="task active" +alias trw="task end.after:today-1wk completed" + +alias to="task open"