The detected command does not change once CLI2::analysis has been
performed. Cache the value of the command to avoid the need to
re-discover the correct value each time we're interested in it.
Canonicalization of attributes or attribute prefixes happens once per
every single task considered in the filtering process. It maps short,
prefixed names to their full-length versions, for example:
"pro" -> "project" in the expression "project:Home"
It follows that such process is not task-dependant and as such the
lookups can be cached.
Since taskwarrior is a CLI tool, it is likely that it is interacted with
programmatically. As such, expressions that a human would not type, but
are syntactically correct are bound to occur. In particular, task
currently is not able to handle empty parentheses expressions:
task +PENDING '(' ')'
This is due to "and" operator being injected between +PENDING (which
translates to '( status = pending )' and '('.
Modify the insertJunctions to not insert the 'and' operator between two
sub-expressions if one of them is an empty parentheses expression.
Closes#1896.
- When 'limit:N' is encountered, it is removed from the command line, and
added as a config setting, equivalent to 'rc.limit:N'.
- This simplifieѕ subsequent command line parsing.
- Only non-'string' type attributes ('numeric', 'date', 'duration') support the
evaluation of values in FILTER arguments, for example:
due.before:now+1d
If evaluation is supported, values need to be lexed into tokens, and if there
are multiple tokens, parenthesize the set.
- Whenever A2::attribute sees 'raw' being set, it automaticall decomposes the
arg, which can now be removed from other methods.
- New ::canonicalizeNames method means that the ::decomposeMod* methods are no
longer needed.
- Removed ::findOverrides which now does nothing.
- Removed unsupported UUID lists, which shoudl have been removed earlier when
Lexer::Type::list was dropped.
- Reversed logic in 'if' statements to perform the lowest cost comparison first.