* 'master' of git://github.com/ginatrapani/todo.txt-cli:
Bugfix: pri accepted priorities of more than a single letter
Don't set sort command in default todo.cfg.
Don't set colors in default todo.cfg.
Cleanup: removing annoying trailing space on pri tasks
Cleanup: del/depri/pri: some more $2 -> $item
Bugfix: handling of priorities in pri/depri/do: no more globbing
Bugfix, take 2: depri no longer wipes out entire task with other parens http://tech.groups.yahoo.com/group/todotxt/message/1828
Bugfix: depri no longer wipes out entire task with other parens http://tech.groups.yahoo.com/group/todotxt/message/1828
Fix misplaced quote that was blocking filename globbing in the action
Add quotes around $action to handle cases where todo.actions.d path includes embedded spaces.
Instead of directly setting a value in todo.cfg, let the user
know what the default is and how to customize it. This allows
developers the flexibility of changing the default in todo.sh
without having to worry about fixing people's config files.
Signed-off-by: Emil Sit <sit@emilsit.net>
Users are probably unlikely to change the definition
of colors like $BLACK so just define them in todo.sh
and comment them out in todo.cfg. Similarly, leave
default values for priority coloring available but
commented out.
Signed-off-by: Emil Sit <sit@emilsit.net>
There were a couple places where $action was used without quotes
that caused a problem if the .todo.actions.d had a parent directory
path that included spaces (e.g. /cygdrive/c/Documents\ and\ Settings/jo-user).
This was in the section that calls the addons with the 'usage' arg.
Signed-off-by: Gina Trapani <ginatrapani@gmail.com>
Implement listcon and listproj in terms of grep -w -o, which prints
words that match the given regular expression, and sort -u, which
obviates uniq. This probably only works with GNU grep, which seems
better than having to rely on gawk (which is used nowhere else).
Signed-off-by: Emil Sit <sit@emilsit.net>
Signed-off-by: Gina Trapani <ginatrapani@gmail.com>
Single space after colon.
No end-of-line whitespace.
Replace tabs with whitespace.
Signed-off-by: Emil Sit <sit@emilsit.net>
Signed-off-by: Gina Trapani <ginatrapani@gmail.com>
Add a basic test framework, borrowed from the framework used
by git.git. A shell script library (tests/test-lib.sh) helps
generate the fixtures, and simplifies the process of writing
test scripts. Tests can be run as a suite (via 'make test')
or individually (sh tests/t0000-config.sh). Results are aggregated
upon completion. Includes a detailed README.
A basic test of config file processing is part of this commit.
Signed-off-by: Emil Sit <sit@emilsit.net>
When generating the distribution files, prepare todo.sh
by subbing in the current version so that users will
get a proper version number.
Tries to detect VERSION-FILE for running from
the development directory but this doesn't work well
when $PWD is not the top of the git repo.
Signed-off-by: Emil Sit <sit@emilsit.net>
Borrowing slightly from git.git, derive a VERSION-FILE
from the current state of user's git working directory.
The VERSION is derived relative to the latest git annotated
tag object (using git-describe) and includable either in
shell scripts or in Makefiles.
The basic 'make dist' target generates a .tar.gz and a .zip
file named by the detected version.
Also include a basic clean target and dummy test target.
Signed-off-by: Emil Sit <sit@emilsit.net>
If a file had blank lines or was totally empty, _list would
result in an in-correct count of total items (either "" or
the number of lines, instead of the number of items). This
commit splits the filtering into three phases: line numbering,
filtering (optional), and post-processing, and then does
counting separately, if desired.
Signed-off-by: Emil Sit <sit@emilsit.net>
Signed-off-by: Gina Trapani <ginatrapani@gmail.com>
Put the old help message under a "help" command. The
short help message just lists the available commands and
should fit on a single screen.
Signed-off-by: Gina Trapani <ginatrapani@gmail.com>
The rewrite of ls functionality may have allowed blank but numbered
lines to creep into the ls display. Search for such lines and
exclude them.
Signed-off-by: Emil Sit <sit@emilsit.net>
Signed-off-by: Gina Trapani <ginatrapani@gmail.com>