From 717f052f13e2f5d168dbc73fd0ee429fa84415ad Mon Sep 17 00:00:00 2001 From: "David A. Harding" Date: Mon, 9 Mar 2009 16:19:30 -0400 Subject: [PATCH] Only Reset Action When Necessary plus Comments --- todo.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/todo.sh b/todo.sh index 4698383..67c3c75 100755 --- a/todo.sh +++ b/todo.sh @@ -348,7 +348,10 @@ action=$( printf "%s\n" "$1" | tr 'A-Z' 'a-z' ) ## or fallback to using a builtin if [ "$action" == command ] then + ## Get rid of "command" from arguments list shift + ## Reset action to new first argument + action=$( printf "%s\n" "$1" | tr 'A-Z' 'a-z' ) elif [ -d "$HOME/.todo.actions.d" -a -x "$HOME/.todo.actions.d/$action" ] then "$HOME/.todo.actions.d/$action" "$@" @@ -356,7 +359,6 @@ then fi ## Only run if $action isn't found in .todo.actions.d -action=$( printf "%s\n" "$1" | tr 'A-Z' 'a-z' ) case $action in "add" | "a") if [[ -z "$2" && $TODOTXT_FORCE = 0 ]]; then