markwu/todo-cli-plugins — pull request #4 by 00Davo (2012-11-03 02:29:59+00:00)
Title: More flexible argument parsing, enables shortcuts for project/context

Rather than validating against a regular expression, any argument not directly matched by the set of cases is passed to the `date` command and attempted to be evaluated as a date. If `date` fails to parse the argument, it is assumed to be an unrecognised option.

This change also makes adding new options to the case set easier, so I added shortcut versions of the project and context view modes: + and @ respectively. This change was actually the reason I made the other changes, supporting more sorts of dates being just a nice side-effect. These shortcuts are provided for the same reason `view` is aliased as `v`: to save typing.

$ todo.sh view project
$ t v +
# compare and contrast ;)