Skip to content

Conversation

@00dani
Copy link

@00dani 00dani commented Nov 3, 2012

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 ;)

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 ;)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant