Allow the use of global config file
If not found elsewhere, look for the config file in /etc/todo/config. `make install` installs a global config file, setting TODO_DIR=~/.todo. todo.sh creates TODO_DIR if it doesn't exist.
This commit is contained in:
@@ -45,6 +45,9 @@ mv todo.cfg custom.cfg
|
||||
mv .todo.actions.d custom.actions
|
||||
echo 'export TODO_ACTIONS_DIR=$HOME/custom.actions' >> custom.cfg
|
||||
|
||||
# Avoid the use of global config file, if it exists
|
||||
export TODOTXT_GLOBAL_CFG_FILE=global.cfg
|
||||
|
||||
test_todo_session '-h and fatal error without config' <<EOF
|
||||
>>> todo.sh -h | sed '/^ \\{0,2\\}[A-Z]/!d'
|
||||
Usage: todo.sh [-fhpantvV] [-d todo_config] action [task_number] [task_description]
|
||||
|
||||
Reference in New Issue
Block a user