diff --git a/todo.actions.d/edit b/todo.actions.d/edit new file mode 100755 index 0000000..f13ba19 --- /dev/null +++ b/todo.actions.d/edit @@ -0,0 +1,12 @@ +#!/bin/bash +case $1 in +"usage") + echo "$(basename $0) [BASENAME]" + echo " Open \$TODO_DIR/BASENAME.txt in \$EDITOR." + echo " If BASENAME is not given, defaults to 'todo'." + ;; +*) + FILE=${2:-todo}.txt + $EDITOR $TODO_DIR/$FILE + ;; +esac