> Currently I am somehow inclined to put a "Commands first" rule into
> Timewarrior and to make the command line parsing take the command
> context more into account (maybe let it fail if it cannot use all
> arguments?).
"Commands first" makes parsing easier. Making parsing easier has not been a priority for Taskwarrior, and instead readability of the command line was considered the goal. For example, both of these are valid for Taskwarrior:
$ task /pattern/ list
$ task list /pattern/
I like supporting both, because I think it allows the user to construct a command that makes most sense in that users native tongue. But that’s Taskwarrior. I could also say that the command line parsing is so strange and difficult, that I’ve rewritten it several times, and have now resorted to creating a dynamic grammar-based parser (rat) to do the job in future releases. I didn’t want to have to do that, but as the concept of a date grows from YYYY-MM-DD and “tomorrow” to more strange things like “Wednesday after Easter”, “next summer”, or “3rd Tuesday in June”, and that of time from HH:MM:SS to “30mins ago”, the cli parsing just gets so much more complex and ambiguous. Consider /usr/bin/ and /from/to/.
Timewarrior does not need to follow the same path, although if we prefer consistency, it should. My original thoughts for Timewarrior were that it is not Taskwarrior, and does not need to be constrained by it.
If Timewarrior follows the same wandering path that Taskwarrior took, then it will have series of releases where sometimes the command line gets more expressive, and others where is gets more restrictive. It would be nice to avoid all those changes.
And here we are. Time to choose. I’m neutral on this topic.
> I am highly anticipating the new command definition document…
Thomas, I think you meant to say “I highly anticipate writing part of the new command definition document”. :-)
Yes this needs to be written, and I imagine it will be the outcome of this conversation, plus a few iterations. The idea was that we should probably develop some guidelines for the command line, and make the individual commands more consistent. The 1.0.0 release command syntax was only partially consistent.
It was also not that user friendly, and we’re beginning to address that now (continue by @id, for example).
We also need to specify whether we can address an interval by its tags, start time, @id, or all of the above. Once that is chosen, the syntax gets a little more well defined.
We will also need to specify whether there metadata in the future, and how it will appear on the command line, even if we don’t implement it now. Also consolidate several commands: tag/untag do not need to be separate; perhaps they should be, perhaps not. Also shorten, lengthen move are all related. Lots to figure out.
P