taskwarrior: Add conditional tasksh invocation
To use taskwarrior, an alias to `t` has been created. If you invoke any taskwarrior command through `t`, it will behave just as taskwarrior would (just with a shorter name). If you invoke `t` without any additional arguments, it will instead open up the tasksh program and let you play around in there.
This commit is contained in:
parent
ed881273b8
commit
489e49fe5e
1 changed files with 11 additions and 1 deletions
|
@ -1,4 +1,14 @@
|
||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
alias t="tasksh"
|
|
||||||
alias taskopen='taskopen -c ${XDG_DATA_HOME}/task/notes'
|
alias taskopen='taskopen -c ${XDG_DATA_HOME}/task/notes'
|
||||||
|
|
||||||
|
# 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
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue