Todo.sh will now check for the config in the same directory as the script--if it's not specified or found in HOME.

This is really nice if todo.sh is kept in dropbox and accessed from multiple computers.
This commit is contained in:
Matt Henkel
2011-02-01 10:26:18 -07:00
committed by Gina Trapani
parent 8e4364f5e1
commit 990bc293ba

10
todo.sh
View File

@@ -497,6 +497,16 @@ export SENTENCE_DELIMITERS=',.:;'
fi
}
[ -e "$TODOTXT_CFG_FILE" ] || {
CFG_FILE_ALT=`dirname $0`"/todo.cfg"
if [ -e "$CFG_FILE_ALT" ]
then
TODOTXT_CFG_FILE="$CFG_FILE_ALT"
fi
}
if [ -z "$TODO_ACTIONS_DIR" -o ! -d "$TODO_ACTIONS_DIR" ]
then
TODO_ACTIONS_DIR="$HOME/.todo/actions"