TODO_ACTIONS_D is now TODO_ACTIONS_DIR
Signed-off-by: Gina Trapani <ginatrapani@gmail.com>
This commit is contained in:
committed by
Gina Trapani
parent
078c69496f
commit
f1caecec4e
4
todo.cfg
4
todo.cfg
@@ -10,8 +10,8 @@ export DONE_FILE="$TODO_DIR/done.txt"
|
|||||||
export REPORT_FILE="$TODO_DIR/report.txt"
|
export REPORT_FILE="$TODO_DIR/report.txt"
|
||||||
export TMP_FILE="$TODO_DIR/todo.tmp"
|
export TMP_FILE="$TODO_DIR/todo.tmp"
|
||||||
|
|
||||||
# Custom your actions directory location
|
# You can customize your actions directory location
|
||||||
#export TODO_ACTIONS_D="$HOME/.todo.actions.d"
|
#export TODO_ACTIONS_DIR="$HOME/.todo.actions.d"
|
||||||
|
|
||||||
# == EDIT FILE LOCATIONS ABOVE ===
|
# == EDIT FILE LOCATIONS ABOVE ===
|
||||||
|
|
||||||
|
|||||||
14
todo.sh
14
todo.sh
@@ -206,10 +206,10 @@ help()
|
|||||||
TODOTXT_SORT_COMMAND="sort ..." customize list output
|
TODOTXT_SORT_COMMAND="sort ..." customize list output
|
||||||
EndHelp
|
EndHelp
|
||||||
|
|
||||||
if [ -d "$TODO_ACTIONS_D" ]
|
if [ -d "$TODO_ACTIONS_DIR" ]
|
||||||
then
|
then
|
||||||
echo ""
|
echo ""
|
||||||
for action in "$TODO_ACTIONS_D/*"
|
for action in "$TODO_ACTIONS_DIR/*"
|
||||||
do
|
do
|
||||||
if [ -x $action ]
|
if [ -x $action ]
|
||||||
then
|
then
|
||||||
@@ -355,10 +355,10 @@ TODOTXT_SORT_COMMAND=${TODOTXT_SORT_COMMAND:-env LC_COLLATE=C sort -f -k2}
|
|||||||
|
|
||||||
export TODOTXT_VERBOSE TODOTXT_PLAIN TODOTXT_CFG_FILE TODOTXT_FORCE TODOTXT_PRESERVE_LINE_NUMBERS TODOTXT_AUTO_ARCHIVE TODOTXT_DATE_ON_ADD TODOTXT_SORT_COMMAND
|
export TODOTXT_VERBOSE TODOTXT_PLAIN TODOTXT_CFG_FILE TODOTXT_FORCE TODOTXT_PRESERVE_LINE_NUMBERS TODOTXT_AUTO_ARCHIVE TODOTXT_DATE_ON_ADD TODOTXT_SORT_COMMAND
|
||||||
|
|
||||||
if [ -z "$TODO_ACTIONS_D" -o ! -d "$TODO_ACTIONS_D" ]
|
if [ -z "$TODO_ACTIONS_DIR" -o ! -d "$TODO_ACTIONS_DIR" ]
|
||||||
then
|
then
|
||||||
TODO_ACTIONS_D="$HOME/.todo.actions.d"
|
TODO_ACTIONS_DIR="$HOME/.todo.actions.d"
|
||||||
export TODO_ACTIONS_D
|
export TODO_ACTIONS_DIR
|
||||||
fi
|
fi
|
||||||
|
|
||||||
TODO_SH="$0"
|
TODO_SH="$0"
|
||||||
@@ -513,9 +513,9 @@ then
|
|||||||
shift
|
shift
|
||||||
## Reset action to new first argument
|
## Reset action to new first argument
|
||||||
action=$( printf "%s\n" "$1" | tr 'A-Z' 'a-z' )
|
action=$( printf "%s\n" "$1" | tr 'A-Z' 'a-z' )
|
||||||
elif [ -d "$TODO_ACTIONS_D" -a -x "$TODO_ACTIONS_D/$action" ]
|
elif [ -d "$TODO_ACTIONS_DIR" -a -x "$TODO_ACTIONS_DIR/$action" ]
|
||||||
then
|
then
|
||||||
"$TODO_ACTIONS_D/$action" "$@"
|
"$TODO_ACTIONS_DIR/$action" "$@"
|
||||||
cleanup
|
cleanup
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user