2020-12-25 10:57:31 +00:00
|
|
|
#!/usr/bin/env sh
|
|
|
|
|
2022-06-12 14:02:04 +00:00
|
|
|
alias taskopen='taskopen --config=${XDG_CONFIG_HOME:-~/.config}/task/taskopenrc'
|
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
|
|
|
|
if [ "$(ps -p $$ -o comm --no-headers)" = "zsh" ]; then compdef t=task; fi
|