From 56dfae0486fa9d178493675ea08a9466eec116bc Mon Sep 17 00:00:00 2001 From: Gina Trapani Date: Sun, 5 Apr 2009 11:42:16 -0700 Subject: [PATCH] first commit --- .todo.actions.d/README | 5 +++++ .todo.actions.d/addx | 19 +++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 .todo.actions.d/README create mode 100755 .todo.actions.d/addx diff --git a/.todo.actions.d/README b/.todo.actions.d/README new file mode 100644 index 0000000..a2a0b3a --- /dev/null +++ b/.todo.actions.d/README @@ -0,0 +1,5 @@ +adda (create a symlink to aa for fewer keystrokes) +* Adds a task and prioritizes it A in one shot + +addx (symlink ax for fewer keystrokes) +* Adds a task and marks it as complete in one shot \ No newline at end of file diff --git a/.todo.actions.d/addx b/.todo.actions.d/addx new file mode 100755 index 0000000..faf50af --- /dev/null +++ b/.todo.actions.d/addx @@ -0,0 +1,19 @@ +#!/bin/bash + +action=$1 +shift + +[ "$action" = "usage" ] && { + echo " Customized add:" + echo " addx \"THING I DID +project @context\"" + echo " add an item and mark it as done in one step" + echo "" + exit +} + +if "$TODO_SH" command add "$@"; then + # figure out the line of what we just added, and prioritize it A + line=`sed -n '$ =' "$TODO_FILE"` + echo "$line" + "$TODO_SH" command do "$line" +fi