Commit Graph

140 Commits

Author SHA1 Message Date
Philippe Teuwen
4d3b7472ff Bugfix: pri accepted priorities of more than a single letter
e.g. todo.sh pri 1 aa

Signed-off-by: Gina Trapani <ginatrapani@gmail.com>
2009-04-11 08:20:15 +08:00
Emil Sit
680e93e737 Don't set sort command in default todo.cfg.
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>
2009-04-07 20:34:10 -04:00
Emil Sit
477738828f Don't set colors in default todo.cfg.
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>
2009-04-07 20:34:10 -04:00
Philippe Teuwen
b9f95633dc Cleanup: removing annoying trailing space on pri tasks
Signed-off-by: Gina Trapani <ginatrapani@gmail.com>
2009-04-08 07:44:41 +08:00
Philippe Teuwen
df1e2eb7cf Cleanup: del/depri/pri: some more $2 -> $item
Signed-off-by: Gina Trapani <ginatrapani@gmail.com>
2009-04-08 07:36:20 +08:00
Philippe Teuwen
a4e68f9c3f Bugfix: handling of priorities in pri/depri/do: no more globbing
Signed-off-by: Gina Trapani <ginatrapani@gmail.com>
2009-04-08 07:36:02 +08:00
Gina Trapani
3028de42a8 Bugfix, take 2: depri no longer wipes out entire task with other parens http://tech.groups.yahoo.com/group/todotxt/message/1828 2009-04-07 10:32:16 -07:00
Gina Trapani
8fceae171d Bugfix: depri no longer wipes out entire task with other parens http://tech.groups.yahoo.com/group/todotxt/message/1828 2009-04-07 10:24:06 -07:00
Dave Hein
9898e7df3f Fix misplaced quote that was blocking filename globbing in the action
'usage' logic.

Signed-off-by: Gina Trapani <ginatrapani@gmail.com>
2009-04-08 00:12:08 +08:00
Dave Hein
42e1a658d6 Add quotes around $action to handle cases where todo.actions.d path includes embedded spaces.
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>
2009-04-08 00:11:49 +08:00
Philippe Teuwen
f1caecec4e TODO_ACTIONS_D is now TODO_ACTIONS_DIR
Signed-off-by: Gina Trapani <ginatrapani@gmail.com>
2009-04-07 03:34:33 +08:00
Philippe Teuwen
078c69496f Parametrize .todo.actions.d location
Signed-off-by: Gina Trapani <ginatrapani@gmail.com>
2009-04-07 03:34:01 +08:00
Gina Trapani
8567a90e4c Bugfix: Replace echoes old todo before new todo. 2009-04-05 10:49:06 -07:00
Philippe Teuwen
55f45e8515 tests: first unset TODOTXT_CFG_FILE
Signed-off-by: Gina Trapani <ginatrapani@gmail.com>
2009-04-05 06:37:38 +08:00
Gina
03ccc73703 Added missing file required for tests 2009-04-04 14:49:30 -07:00
U-STARBUCK\gina
a822560d44 Added user-facing download link 2009-04-04 12:21:53 -07:00
U-STARBUCK\gina
d860c2c36e Converted tab to spaces 2009-04-04 12:18:57 -07:00
U-STARBUCK\gina
7f954d73ae Merged test and dist Makefile to master branch for easier dev 2009-04-04 12:16:18 -07:00
U-STARBUCK\gina
8e864568a9 Allow custom sort (tx edgewood) 2009-04-02 22:47:50 -07:00
Emil Sit
df4f9150cf Remove gawk and uniq dependencies for listcon, listproj.
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>
2009-04-03 13:32:20 +08:00
Emil Sit
5cc988102d Misc. whitespace cleanups.
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>
2009-04-03 13:32:20 +08:00
U-STARBUCK\gina
3a0fd43270 Moving Makefile dist infrastructure to a separate branch 2009-04-02 21:49:12 -07:00
U-STARBUCK\gina
1a6ff81e28 Makefile infrastructure v2.3.0 v2.3 2009-04-02 21:01:44 -07:00
Emil Sit
5491e458a2 tests: Simple null test of all list commands
Signed-off-by: Emil Sit <sit@emilsit.net>
2009-04-02 21:09:35 -04:00
Emil Sit
5789f5b4c2 Convenience Makefile for running tests inside tests dir.
Simply call up to parent directory where all the real rules
are specified.

Signed-off-by: Emil Sit <sit@emilsit.net>
2009-04-02 21:09:19 -04:00
Emil Sit
b17cb11ec6 Initial test framework and first test.
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>
2009-04-02 21:09:10 -04:00
Emil Sit
0b3d9109de todo.sh: Generate version info at dist time.
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>
2009-04-02 21:05:58 -04:00
Emil Sit
ad40ef0f18 Basic Makefile and infrastructure to support dist tarballs.
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>
2009-04-02 21:05:58 -04:00
Emil Sit
31216fe365 _list: Fix line/item counting, accounting for blank lines.
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>
2009-04-03 07:42:43 +08:00
Emil Sit
7f5c8fb3e1 Add a short help message to be called for -h.
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>
2009-03-21 07:20:35 +08:00
Emil Sit
3e7b60abcd Factor out common usage message text.
Signed-off-by: Gina Trapani <ginatrapani@gmail.com>
2009-03-21 07:20:29 +08:00
Emil Sit
cc3e5f73aa _list: Add in an extra filter to remove empty lines.
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>
2009-03-21 07:20:28 +08:00
Gina Trapani
52604ebf78 Tweaked version and contributor details 2009-03-19 18:52:47 -07:00
Gina Trapani
bbe153b9bb Merge branch 'harding/master' 2009-03-19 18:40:10 -07:00
Gina Trapani
ec54a032cb Removed edit action 2009-03-19 18:37:36 -07:00
David A. Harding
758cdc5551 Merge branch 'gina/master' 2009-03-19 07:10:09 -04:00
David A. Harding
02dc030225 Putting Quotes Around $TODO_TMP
Suggested by Gina.
2009-03-19 07:06:07 -04:00
David A. Harding
7b769b2eea s/[A-Z]/[[:upper:]]/ 2009-03-17 19:15:27 -04:00
David A. Harding
39ee9ab045 Added -vv For Debugging Output 2009-03-17 14:07:48 -04:00
Gina Trapani
1e5902d0e2 Merge branch 'master' of git@github.com:ginatrapani/todo.txt-cli 2009-03-16 12:28:34 -05:00
Matt Brubeck
3df7497287 Add TODOTXT_DEFAULT_ACTION variable.
I like to set this to "ls" so I can just run "todo.sh" (or "t") to list my
tasks.

Signed-off-by: Gina Trapani <ginatrapani@gmail.com>
2009-03-17 01:04:20 +08:00
David A. Harding
07bb979d43 Move Filter Command Up & Remove Extra Sort Command 2009-03-14 15:06:53 -04:00
Ed Blackman
7e04849a4f Move filter before priority text changes, so filter doesn't match invisible text 2009-03-14 13:39:27 -04:00
David A. Harding
f8b2646b92 Don't Echo Empty Lines & Streamline Sed wc -l Syntax 2009-03-14 09:35:10 -04:00
Ed Blackman
02980ae7ee Fix "post_hilter_command" typo 2009-03-14 01:18:42 -04:00
Ed Blackman
12bbf8fe67 Fix spacing (tabs to spaces) 2009-03-14 01:17:46 -04:00
Ed Blackman
ab78607506 Use sed line counting to replace 'wc -l' 2009-03-14 01:15:52 -04:00
David A. Harding
6be78ca5fa Added Exclusion Syntax by Jacobo de Vera
-keyword or -"key phrase" should exclude those terms from the output.
2009-03-13 22:21:48 -04:00
Ed Blackman
9ab77253db Implement pre and post filters in _list 2009-03-13 18:17:16 -04:00
Ed Blackman
cf3c5312bf Export _list for call by extensions 2009-03-13 17:02:31 -04:00