From b1ba3a254c217735f9813fc08881ae963193e19c Mon Sep 17 00:00:00 2001 From: Orien Vandenbergh Date: Thu, 22 Oct 2015 15:33:13 -0600 Subject: [PATCH] Added a todo.txt plugin that reintroduces functionality they removed, stopgap presently. --- todo.actions.d/done.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 todo.actions.d/done.sh diff --git a/todo.actions.d/done.sh b/todo.actions.d/done.sh new file mode 100755 index 0000000..7e0e68f --- /dev/null +++ b/todo.actions.d/done.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +action=$1 +shift + +[ "$action" = "usage" ] && { + echo " done:" + echo " done \"THING THAT WAS ALREADY COMPLETED\"" + echo " add an item and mark it as done in one step" + echo "" + exit +} + +if "$TODO_SH" command add "$@"; then + line=`wc -l "$TODO_FILE" | cut -d' ' -f1` + "$TODO_SH" command do "$line" +fi