dotfiles/taskwarrior/.config/sh/alias.d/taskwarrior.sh
Marty Oehme 5c41b2e13c
taskwarrior: Update config for taskopen 2.0 format
Updated the formatting of the taskopen configuration file to conform to
its new display.

Updated the xdg-conforming `taskopen` alias to use long-form option
since the short-form option seems bugged at the moment.
2022-06-12 16:02:04 +02:00

19 lines
682 B
Bash

#!/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() {
# 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
}
# 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