plugin/base: rewrite t() function to use todo.sh

Move the test for whether `plugin/todo` is enabled inside the function, and remove the alias from there.

Alsö, respect `$XDG_STATE_HOME` and move the old `~/.t` file if it exists.
This commit is contained in:
John D Pell
2021-12-30 22:52:16 -08:00
parent 02b57a83ef
commit d6bcedfa96
2 changed files with 21 additions and 16 deletions

View File

@@ -4,5 +4,3 @@ about-plugin 'Todo.txt integration'
# you may override any of the exported variables below in your .bash_profile
: "${TODOTXT_DEFAULT_ACTION:=ls}"
export TODOTXT_DEFAULT_ACTION
alias t='todo.sh'