Avoiding todo.sh help error when .todo.actions.d contains subdirs.

I have placed tests for my custom todo actions in ~/.todo.actions.d/tests/; this causes a ".../.todo.actions.d/tests: is a directory" error on todo.sh help.
Added condition for regular files to the executable check in order to exclude subdirectories.
This commit is contained in:
Ingo Karkat
2010-10-21 12:27:30 +02:00
parent ce501c5362
commit 9760ee23c7

View File

@@ -232,7 +232,7 @@ help()
echo "" echo ""
for action in "$TODO_ACTIONS_DIR"/* for action in "$TODO_ACTIONS_DIR"/*
do do
if [ -x "$action" ] if [ -f "$action" -a -x "$action" ]
then then
"$action" usage "$action" usage
fi fi