CLI2: Handle empty parentheses expressions
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.
This commit is contained in:
@@ -99,6 +99,7 @@ private:
|
||||
void findUUIDs ();
|
||||
void insertIDExpr ();
|
||||
void lexFilterArgs ();
|
||||
bool isEmptyParenExpression (std::vector<A2>::iterator it, bool forward = true) const;
|
||||
void desugarFilterPlainArgs ();
|
||||
void insertJunctions ();
|
||||
void defaultCommand ();
|
||||
|
||||
Reference in New Issue
Block a user