Exit If .todo.actions.d Script Is Run

.
Suggested by Philippe Teuwen, this patch undoes a lot of the unnecessary
formating changes in my previous patch.
This commit is contained in:
David A. Harding
2009-03-08 11:46:26 -04:00
parent e6649e6293
commit 98646a575a

View File

@@ -323,10 +323,14 @@ shopt -s extglob
# == HANDLE ACTION ==
action=$( printf "%s\n" "$1" | tr 'A-Z' 'a-z' )
## Run and quit if there's a actions script
if [ -d "$HOME/.todo.actions.d" -a -x "$HOME/.todo.actions.d/$action" ]
then
CFG_FILE="$CFG_FILE" "$HOME/.todo.actions.d/$action" "$@"
else
cleanup
fi
## Only run if $action isn't found in .todo.actions.d
case $action in
"add" | "a")
if [[ -z "$2" && $FORCE = 0 ]]; then
@@ -753,4 +757,3 @@ else
usage
;;
esac
fi