From 990bc293baf07068afc8706676424d530dff5c3f Mon Sep 17 00:00:00 2001 From: Matt Henkel Date: Tue, 1 Feb 2011 10:26:18 -0700 Subject: [PATCH] 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. --- todo.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/todo.sh b/todo.sh index aab6314..3805f98 100755 --- a/todo.sh +++ b/todo.sh @@ -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"