add todo.txt-cli as a plugin

Since it is referenced in the default .bash_profile and in aliases and
themes, why not make it an official plugin?

This creates a 'todo/' directory in /plugins/available, and installs
todo.sh and friends there.  Tab completion and the 't' alias should work
out of the box.

Note: it was also necessary to modify .gitignore to ignore the files
todo.sh generates in custom/.
This commit is contained in:
Erich Smith
2012-05-09 19:32:05 -04:00
parent 89263728f2
commit f5badb3c28
6 changed files with 1517 additions and 13 deletions

View File

@@ -0,0 +1,13 @@
#!/bin/bash
export TODO_DIR=$HOME/.bash_it/custom # store todo items in user's custom dir, ignored by git
export TODOTXT_DEFAULT_ACTION=ls # typing 't' by itself will list current todos
export TODO_SRC_DIR=$HOME/.bash_it/plugins/available/todo
# respect ENV var set in .bash_profile, default is 't'
alias $TODO='$TODO_SRC_DIR/todo.sh -d $TODO_SRC_DIR/todo.cfg'
export PATH=$PATH:$TODO_SRC_DIR
source $TODO_SRC_DIR/todo_completion # bash completion for todo.sh
complete -F _todo $TODO # enable completion for 't' alias