Commit Graph

251 Commits

Author SHA1 Message Date
Jared Cordasco
99511169c3 Fixed erroneous hide/show comments. 2010-01-05 15:38:24 -05:00
Jared Cordasco
acc881f0dd Faster here document outputs. (Help/Usage messages) 2010-01-05 15:33:34 -05:00
Jared Cordasco
d337933fd9 Changed odd tabs to spaces. 2010-01-05 15:33:34 -05:00
Jared Cordasco
0a7e6337b2 Quoting regexp to parse properly. 2010-01-04 17:01:29 -05: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
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
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
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>
2009-05-11 12:53:59 -04: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
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
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
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
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
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
U-STARBUCK\gina
d860c2c36e Converted tab to spaces 2009-04-04 12:18:57 -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