The script doesn't seem to expand the tilde for a user's home directory, and instead needs an absolute path. I have added a comment to help new users avoid the same pitfall.
Addons can be placed in subfolders with the same name as the action,
in order to be able to e.g. clone git repos into the TODO_ACTIONS_DIR
rather than having to download addons and manage updates manually.
Closes#120
Because @contexts and +projects are metadata as much as they are text,
it can be nice to highlight them independently of the coloring of the line
that contains them. This is tough to do correctly in
a TODOTXT_FINAL_FILTER because doing it at that layer requires
re-parsing the text of the line to find the appropriate PRI_$x color to
reset to after coloring the word, or trying to reverse engineer where
the color codes inserted by todo.sh end and the user's text begins (and
vice versa).
Closes#119
Request from exatto (http://article.gmane.org/gmane.comp.diary.todotxt/4699), who doesn't want to use done.txt and report.txt.
Also consider character devices (-c; /dev/null is one) in the file existence checks so that no empty file is then created.
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.
The user may need the help to solve any fatal error that appears while todo.sh isn't properly set up. As the help actions do not depend on any setting that the fatal errors check, we can still invoke them.
Factor out dieWithHelp() and use that for printing the fatal errors.
POSIX sed doesn't support regex branches; I don't want to switch to modern regexp (via -E), since that makes more characters special. Rather, expand the alternatives into two sed commands.
Need to make match of preceding priority optional.
Also tighten patterns for priority and done marker by anchoring them to the front, as the leading task number has already been substituted away.
When the command-under-test fails with a non-zero exit code, neither the different exit code nor any output differences are printed. Also, there's a lot of duplication between test_expect_output and test_expect_code_and_output. So, let's fix both by delegating the first to the latter.
Usually (i.e. when a pager is available), the help() output is piped through the pager, and then the return code will be the one of the pager. So the exit 1 at the end of help() doesn't make much sense, and should be abolished for consistency.