This design document is a work in progress, and subject to change. Once finalized, the feature will be scheduled for an upcoming release.
The Taskwarrior command line syntax is being updated to allow more consistent and predictable results, while making room for new features.
Adding support for arbitrary expressions on the command line has become complicated because of the relaxed syntax of Taskwarrior. While the relaxed syntax allows for a very expressive command line, it also creates ambiguity for the parser, which needs to be reduced.
With some limited and careful changes it will be possible to have a clear and unambiguous command line syntax, which means a predictable and deterministic experience.
It should be stated that for straightforward and even current usage patterns, the command line will likely not change for you. Another goal is to not require changes to 3rd-party software, where possible. Only the more advanced and as-yet unintroduced features will require a more strict syntax. This is why now is an ideal time to tighten the requirements.
The argument types supported remain the same, adding some new constructs.
|Config file override||
Modifier is one of:
Certain command line constructs will no longer be supported, and this is imposed by the new rules:
task add project:Home +tag Repair the thing # Good task add project:Home +tag 'Repair the thing' # Good task add 'project:Home +tag Repair the thing' # BadPutting two arguments into one quoted arg makes that arg a
task add project:'Home & Garden' ... # Good task add 'project:Home & Garden' ... # Good task add project:Home\ \&\ Garden ... # Good task add project:Home' & 'Garden ... # Good task add project:Home \& Garden ... # BadThe parser will not combine multiple arguments, for example:
task '/one two/' list # Good task /one two/ list # Bad task /'one two'/ list # Bad, unless ' is part of the pattern
:=eval operator is used, and if so, the whole argument may need to be quoted or escaped to satisfy Rule 1.
task add project:3.project+x # Literal task add project:=3.project+x # DOM reference + concatenation
task /foo/ list # Good task foo list # Bad
task urgency \< 5.0 list # Good task 'urgency < 5.0 list' # Bad
Aside from the command line parser, there are other changes needed:
task [overrides] [(cli-filter)] [(context-filter)] [(report-filter)] command [modifications]
YYYYMMDD # Bad YYYY-MM-DD # Good hhmmss # Bad hh:mm:ss # Good