This patch does 2 things: - Allowing environment variables corresponding to options (e.g. VERBOSE for -v) to be predefined in the user environment instead of having to always use the corresponding option. - Adding namespace TODOTXT_ to those envvars to avoid clashes in user environment todo.action.d scripts can call recursively todo.sh and this patch preserves the options/envvars through the calls. As a bonus, now the user can export in advance one of those variables in his/her environment and it would have the same effect as using the todo.sh corresponding option. export TODOTXT_AUTO_ARCHIVE=0 is same as option -a export TODOTXT_CFG_FILE=CONFIG_FILE is same as option -d CONFIG_FILE export TODOTXT_FORCE=1 is same as option -f export TODOTXT_PRESERVE_LINE_NUMBERS=0 is same as option -n export TODOTXT_PLAIN=1 is same as option -p export TODOTXT_DATE_ON_ADD=1 is same as option -t export TODOTXT_VERBOSE=1 is same as option -v Signed-off-by: Gina Trapani <ginatrapani@gmail.com>
22 KiB
Executable File
22 KiB
Executable File