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:
7
todo.sh
7
todo.sh
@@ -323,10 +323,14 @@ shopt -s extglob
|
|||||||
# == HANDLE ACTION ==
|
# == HANDLE ACTION ==
|
||||||
action=$( printf "%s\n" "$1" | tr 'A-Z' 'a-z' )
|
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" ]
|
if [ -d "$HOME/.todo.actions.d" -a -x "$HOME/.todo.actions.d/$action" ]
|
||||||
then
|
then
|
||||||
CFG_FILE="$CFG_FILE" "$HOME/.todo.actions.d/$action" "$@"
|
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
|
case $action in
|
||||||
"add" | "a")
|
"add" | "a")
|
||||||
if [[ -z "$2" && $FORCE = 0 ]]; then
|
if [[ -z "$2" && $FORCE = 0 ]]; then
|
||||||
@@ -753,4 +757,3 @@ else
|
|||||||
usage
|
usage
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
|
||||||
|
|||||||
Reference in New Issue
Block a user