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.
This commit is contained in:
Marty Oehme 2022-12-08 12:18:00 +01:00
parent 3c3cc20dc2
commit cfddecba60
Signed by: Marty
GPG Key ID: 73BA40D5AFAF49C9
1 changed files with 15 additions and 2 deletions

View File

@ -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"