Skip to content

Commit 9b46037

Browse files
committed
allow parameters / options in default action
1 parent 837ce22 commit 9b46037

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

todo.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -982,6 +982,13 @@ elif [ -d "$TODO_ACTIONS_DIR" -a -x "$TODO_ACTIONS_DIR/$action" ]
982982
then
983983
"$TODO_ACTIONS_DIR/$action" "$@"
984984
exit $?
985+
else
986+
actionarray=($action)
987+
if [ -d "$TODO_ACTIONS_DIR" -a -x "$TODO_ACTIONS_DIR/${actionarray[0]}" ]
988+
then
989+
"$TODO_ACTIONS_DIR/${actionarray[0]}" $action
990+
exit $?
991+
fi
985992
fi
986993

987994
## Only run if $action isn't found in .todo.actions.d

0 commit comments

Comments
 (0)