mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
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:
parent
c6fdb7e590
commit
456dfdc8cf
2 changed files with 47 additions and 4 deletions
|
@ -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 ();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue