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:
parent
3c3cc20dc2
commit
cfddecba60
1 changed files with 15 additions and 2 deletions
|
@ -1,7 +1,5 @@
|
||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
alias taskopen='taskopen --config=${XDG_CONFIG_HOME:-~/.config}/task/taskopenrc'
|
|
||||||
|
|
||||||
# invoking t starts the task shell
|
# invoking t starts the task shell
|
||||||
# passing arguments along passes them straight through to taskwarrior instead
|
# passing arguments along passes them straight through to taskwarrior instead
|
||||||
t() {
|
t() {
|
||||||
|
@ -17,3 +15,18 @@ t() {
|
||||||
# this is not very pretty and not super portable (needs ps) but
|
# this is not very pretty and not super portable (needs ps) but
|
||||||
# works for now. from here: https://unix.stackexchange.com/a/72564/414758
|
# 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
|
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"
|
||||||
|
|
Loading…
Reference in a new issue