2020-12-25 10:57:31 +00:00
|
|
|
#!/usr/bin/env sh
|
|
|
|
|
2020-12-25 16:46:54 +00:00
|
|
|
# invoking t starts the task shell
|
|
|
|
# passing arguments along passes them straight through to taskwarrior instead
|
|
|
|
t() {
|
2021-03-27 21:15:45 +00:00
|
|
|
# check for existence of tasksh before doing this whole song and dance
|
|
|
|
if type tasksh >/dev/null 2>&1 && [ "$#" -eq 0 ]; then
|
|
|
|
tasksh
|
|
|
|
else
|
|
|
|
task "$@"
|
|
|
|
fi
|
2020-12-25 16:46:54 +00:00
|
|
|
}
|
2021-03-27 21:15:45 +00:00
|
|
|
|
|
|
|
# copy the `task` zsh completions over to my little alias 😉
|
|
|
|
# this is not very pretty and not super portable (needs ps) but
|
|
|
|
# works for now. from here: https://unix.stackexchange.com/a/72564/414758
|
2023-01-10 14:37:45 +00:00
|
|
|
if exist task && [ "$(ps -p $$ -o comm --no-headers)" = "zsh" ]; then compdef t=task; fi
|
2022-12-08 11:18:00 +00:00
|
|
|
|
|
|
|
# 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"
|
|
|
|
|
2023-01-12 21:55:18 +00:00
|
|
|
if exist timew; then
|
|
|
|
alias tra="task active && timew"
|
|
|
|
else
|
|
|
|
alias tra="task active"
|
|
|
|
fi
|
2022-12-08 11:18:00 +00:00
|
|
|
alias trw="task end.after:today-1wk completed"
|
|
|
|
|
2022-12-20 11:06:34 +00:00
|
|
|
alias tad="task +ACTIVE done"
|
|
|
|
alias tas="task +ACTIVE stop"
|
|
|
|
|
2022-12-08 11:18:00 +00:00
|
|
|
alias to="task open"
|