Commit Graph

247 Commits

Author SHA1 Message Date
Brian Phillips
9c56d2137a added 'silent' to a bunch of calls 2009-12-02 15:26:32 -06:00
Brian Phillips
ceed8bf841 more tweaks 2009-12-02 15:17:12 -06:00
Brian Phillips
b8ced51a22 added some additional mappings, plus a project context 2009-12-02 14:37:36 -06:00
Brian Phillips
9a56bdd4ed vim support! (first cut, anyway) 2009-12-02 12:09:51 -06:00
Brian Phillips
9b580acf14 support PAGER pipe for help output 2009-12-02 08:55:46 -06:00
Paul Mansfield
0d5904658e Portability fixes
* Removed last echo -e instances, no support in OSX
2009-09-21 03:17:10 +01:00
Paul Mansfield
97866082e6 Small change for addm test case.
* Seems echo -e isn't multiplatform compatible. Using >> for append
  instead.
2009-09-17 23:52:43 +01:00
Mike West
5f9fd4c759 Bug Fix: tasks whose ID begins with '0' ought to be ignored.
*   Fixed regex in `_list` to exclude lines that begin with whitespace,
    as the ' ' => '0' replacement hadn't yet been performed.

*   Added test cases to `t1300-ls.sh` to check for this condition.
2009-09-14 21:21:25 +02:00
Gina Trapani
5a49f4b5d5 Merge branch 'the1ts/addm' 2009-09-08 11:58:04 -07:00
Gina Trapani
f8e6a8d69d Merge branch 'the1ts/master' 2009-09-08 11:57:20 -07:00
Paul Mansfield
2983917f25 whitespace fix 2009-09-06 19:05:46 +01:00
Paul Mansfield
7a87077dfc Added new action addm
This allows addition of multiple todo items by sending multiple lines.
2009-09-06 18:53:31 +01:00
Paul Mansfield
51dd50b41d Tighten the regex in Issue 6 bugfix.
Checks for complete action names before escaping &'s
2009-09-05 23:55:22 +01:00
Paul Mansfield
ddaf9ade22 Bug Fix: Issue 6 append and replace unexpected behavior if there's an & in task (even in quotes)
Using the cleaninput function, to escape &'s on certain actions.
Currently the actions needing escaped &'s are append, prepend and replace.
Other actions including add need unescaped &'s.
2009-09-05 20:36:38 +01:00
Gina Trapani
ce8a0a7875 Merge branch 'the1ts/master' 2009-09-04 16:11:50 -07:00
Paul Mansfield
5e71728cda Added a new variable $TODO_FULL_SH
This gives access to the full path of the script. It may prove useful
for addon developers to rerun todo.sh from within their addons, in order
to populate variables for context, projects etc. As we have the config
and actions directory available via variables, this is a missing piece.
2009-09-04 13:37:07 +01:00
Paul Mansfield
f44bcfb067 Bug Fix, better fix for "add does not escape line breaks"
Now removes windows and unix style line breaks. Each test has a windows
and a unix style line break.
2009-09-04 12:23:48 +01:00
Gina Trapani
a19a3616c4 Merge branch 'the1ts/master' 2009-09-03 10:45:03 -07:00
Paul Mansfield
229737bd2f Bug Fix: Issue 1
Added a cleanitem function, this replaces newlines with a space.
Currently this is used in the add, append, prepend and replace actions.
2009-09-02 23:30:14 +01:00
Gina Trapani
857121090a Merge branch 'FND/disable_final_filter' 2009-09-01 09:53:37 -07:00
FND
490f5d34e8 added option to disable final filter
The option marker was chosen as "-x" here.
Alternatives might be "-X" or "-*".
2009-08-30 09:48:44 +01:00
Paul Mansfield
7baf051942 Bug Fix: do: no safeguard to do twice
Tests item is not marked done before attempting to mark item as "done".
2009-08-29 21:13:38 +01:00
Gina Trapani
266d9e1258 Merge branch 'mivok/master' 2009-08-26 16:21:14 -07:00
Gina Trapani
e0b3ea1da9 Added new multiple do capability to help message 2009-08-26 15:51:27 -07:00
Gina Trapani
35e80b3f33 Merge branch 'the1ts/master' 2009-08-26 15:34:39 -07:00
David A. Harding
294e2ac9a4 Fixed issue #14: invalid date range. Changed regex [ -~] to [ ~-]. 2009-08-22 16:01:20 -04:00
Paul Mansfield
8d78cc6053 Merge branch 'issues11' of git@github.com:the1ts/todo.txt-cli 2009-07-04 11:07:41 +01:00
Paul Mansfield
092e83404f Bug Fix: prepend not correct on prioritized tasks
Check for priority, if one exists, remove, prepend and add back.
If priority doesn't exist just runs the normal prepend functionality.
2009-06-27 12:51:48 +01:00
Paul Mansfield
91126e38aa Issue fix: Multiple do items
Can now do multiple items in one go.
Either comma seperated list or a whitespace seperated list
2009-06-25 00:14:00 +01:00
Paul Mansfield
5df58793a0 Bug fix: for replace with priority
Checks for priority, removes, does replace then reinserts priority
2009-06-24 23:25:33 +01:00
Paul Mansfield
d2e892049d Bugfix: Replace with priority set
Checks for a priority, if found removes priority does the replace
then adds back the priority.

Added a test for replace with priority set.
2009-06-24 19:24:53 +01:00
Paul Mansfield
0e2798acce Added test for prepend and priority fix 2009-06-24 14:06:25 +01:00
Mark Harrison
98569d5f8c Tests for additional default config file location 2009-06-22 22:34:45 -04:00
Mark Harrison
75622c4a72 Support use of $HOME/.todo/ for all todo.sh configuration 2009-06-22 22:26:16 -04:00
Paul Mansfield
f9bb135068 Fixing prepend and priority issue.
Check for priority, delete if found, prepend and add back priority.
Uses awk and sed, works in linux.
2009-06-22 22:47:13 +01:00
Emil Sit
a4227dfec1 listcon/listproj: Work around bug in older GNU greps.
Commit df4f9150 introduced the use of "grep -w -o".  This
combination was broken from the introduction of -o (in 2001) until
subsequent release of GNU grep 2.5.3 in 2007---see changelog for
2005-11-10.  In particular, OS X uses a pre-2.5.3 version
of GNU grep.

Work around by replacing with two greps: one to find maximal
strings with @s in them (still relying on -o) and the second to
extract contexts.

Reported by Jon Smajda <jon@smajda.com>; fix developed
in conjunction with Philippe Teuwen <phil@teuwen.org>.

Signed-off-by: Emil Sit <sit@emilsit.net>
v2.4.0 v2.4
2009-05-11 12:53:59 -04:00
Emil Sit
78850255e0 tests: Add tests to validate listcon and listproj.
Two basic tests to ensure that listcon and listproj
function as expected.

Signed-off-by: Emil Sit <sit@emilsit.net>
2009-05-10 21:49:37 -04:00
ginatrapani
4dda7e27e4 Updated Known Bugs link to GitHub's Issues Tracker 2009-04-26 10:07:43 -07:00
Philippe Teuwen
cace5eb2d9 Bugfix: TODOTXT_DEFAULT_ACTION was not exported, now exports TODOTXT_*
Simplify the export of TODOTXT variables by having bash construct
the export list dynamically.

Signed-off-by: Emil Sit <sit@emilsit.net>
2009-04-25 20:27:59 -04:00
Philippe Teuwen
701c30c04f test-lib.sh: unset some more TODOTXT env vars for extra safety
While preparing a setup where env vars overload config file,
I had the bad experience that my actual todo.txt was messed up
by the testsuite so it's safer to unset everything.

Even so, some tests could have failed if some TODOTXT_ were set
in the user environment, for example:
export TODOTXT_PLAIN=1
./t1200-pri.sh

Since test-lib.sh does not depend on bash currently, calculate
the list of variables to be unset using set|sed.

Signed-off-by: Emil Sit <sit@emilsit.net>
2009-04-25 20:06:09 -04:00
Philippe Teuwen
2e62536f90 Bugfix: t0000-config test config file was wrong
$TODO_DIR were not protected therefore evaluated to null string
Hopefully it was used only to test for its own presence
but better to fix it in case someone wants to reuse that code

Signed-off-by: Emil Sit <sit@emilsit.net>
2009-04-20 10:04:45 -04:00
Philippe Teuwen
678283b69e Bugfix: typo in addto help msg skipped name of command
Signed-off-by: Emil Sit <sit@emilsit.net>
2009-04-20 10:04:45 -04:00
Philippe Teuwen
c490e773cf test-lib.sh: Fixing grep for date detection on Mac OS X, thanks Dave!
Signed-off-by: Emil Sit <sit@emilsit.net>
2009-04-20 10:04:44 -04:00
Dave Hein
a67d0de625 Add TODOTXT_FINAL_FILTER to provide a final custom list filter.
The idea behind this is to allow a config file or addon to inject
a list output filter after all the other filtering has been
performed. The existing TODOTXT_SORT_COMMAND provides a hook
for a custom filter prior to colorization and priority/context/proj
hiding; this new TODOTXT_FINAL_FILTER provides a hook for custom
filtering after the colorization and pri/con/proj hiding.

(I found this hook was needed when I wanted to trim the output to a
maximum line length.)

Note: I've added a number of tests of the list command, including
one for this new variable, as part of this change.

Signed-off-by: Emil Sit <sit@emilsit.net>
2009-04-19 20:30:53 -04:00
Philippe Teuwen
55015f5071 Bugfix: support commands combination for TODOTXT_SORT_COMMAND
So now e.g. piped commands can be used:
export TODOTXT_SORT_COMMAND=" env LC_COLLATE=C sort -f -k2 - | grep -m 10 ."
2009-04-19 20:30:53 -04:00
Philippe Teuwen
c8fc661256 Bugfix: test-lib.sh TEST_DIRECTORY could still contain symlink 2009-04-19 20:30:53 -04:00
Emil Sit
fee3133547 Uniformly use $TODO_SH to refer to script.
Set $TODO_SH to just be $(basename "$0") at the beginning
of the script and use it in all usage messages.

This happens to simplify testing because it allows us to refer to
the script as "todo.sh" in all output.  For general use, if the
user has aliased to file to something else, the usage messages will
still reflect that alias.

Signed-off-by: Emil Sit <sit@emilsit.net>
2009-04-18 21:26:42 -04:00
Emil Sit
825c60514f tests: Factor basic add/list, replace, priority testing out of t9999
add/list and replace are already covered by existing tests.
Add a new test, t1200-pri.sh, that handles the priority tests.

Signed-off-by: Emil Sit <sit@emilsit.net>
2009-04-15 01:28:01 -04:00
ginatrapani
90d113b77d Added wiki front page link 2009-04-14 19:47:52 -07:00
ginatrapani
4caee7d9c0 Consolidated docs under one header 2009-04-14 19:46:30 -07:00