mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
TW-1434
- TW-1434 Parser issue in description.contains (thanks to Ralph Bean).
This commit is contained in:
parent
4bbb6fea99
commit
d38e606a50
2 changed files with 4 additions and 14 deletions
|
@ -171,6 +171,7 @@
|
|||
- TW-1424 Using a date of '1824days' (in the future) fails (thanks to Black Ops
|
||||
Testing).
|
||||
- TW-1428 Add support for color.uda.<name>.<value> rules.
|
||||
- TW-1434 Parser issue in description.contains (thanks to Ralph Bean).
|
||||
- TW-1436 Parser hangs when multiple slashes are used.
|
||||
- TW-1437 taskd.trust has a bad default value.
|
||||
- TW-1441 task import continues happily if filename doesn't exist.
|
||||
|
|
17
src/CLI.cpp
17
src/CLI.cpp
|
@ -1128,6 +1128,7 @@ void CLI::desugarFilterAttributeModifiers ()
|
|||
|
||||
A op ("argAttmod", "");
|
||||
op.tag ("FILTER");
|
||||
op.tag ("OP");
|
||||
|
||||
A rhs ("argAttMod", "");
|
||||
rhs.tag ("FILTER");
|
||||
|
@ -1135,77 +1136,66 @@ void CLI::desugarFilterAttributeModifiers ()
|
|||
if (modifier == "before" || modifier == "under" || modifier == "below")
|
||||
{
|
||||
op.attribute ("raw", "<");
|
||||
op.tag ("OP");
|
||||
rhs.attribute ("raw", value);
|
||||
rhs.tag ("LITERAL");
|
||||
}
|
||||
else if (modifier == "after" || modifier == "over" || modifier == "above")
|
||||
{
|
||||
op.attribute ("raw", ">");
|
||||
op.tag ("OP");
|
||||
rhs.attribute ("raw", value);
|
||||
rhs.tag ("LITERAL");
|
||||
}
|
||||
else if (modifier == "none")
|
||||
{
|
||||
op.attribute ("raw", "==");
|
||||
op.tag ("OP");
|
||||
rhs.attribute ("raw", "''");
|
||||
rhs.tag ("LITERAL");
|
||||
}
|
||||
else if (modifier == "any")
|
||||
{
|
||||
op.attribute ("raw", "!=");
|
||||
op.tag ("OP");
|
||||
rhs.attribute ("raw", "''");
|
||||
rhs.tag ("LITERAL");
|
||||
}
|
||||
else if (modifier == "is" || modifier == "equals")
|
||||
{
|
||||
op.attribute ("raw", "==");
|
||||
op.tag ("OP");
|
||||
rhs.attribute ("raw", value);
|
||||
rhs.tag ("LITERAL");
|
||||
}
|
||||
else if (modifier == "isnt" || modifier == "not")
|
||||
{
|
||||
op.attribute ("raw", "!=");
|
||||
op.tag ("OP");
|
||||
rhs.attribute ("raw", value);
|
||||
rhs.tag ("LITERAL");
|
||||
}
|
||||
else if (modifier == "has" || modifier == "contains")
|
||||
{
|
||||
op.attribute ("raw", "~");
|
||||
op.tag ("OP");
|
||||
rhs.attribute ("raw", value);
|
||||
rhs.attribute ("raw", "'" + value + "'");
|
||||
rhs.tag ("LITERAL");
|
||||
}
|
||||
else if (modifier == "hasnt")
|
||||
{
|
||||
op.attribute ("raw", "!~");
|
||||
op.tag ("OP");
|
||||
rhs.attribute ("raw", value);
|
||||
rhs.attribute ("raw", "'" + value + "'");
|
||||
rhs.tag ("LITERAL");
|
||||
}
|
||||
else if (modifier == "startswith" || modifier == "left")
|
||||
{
|
||||
op.attribute ("raw", "~");
|
||||
op.tag ("OP");
|
||||
rhs.attribute ("raw", "'^" + value + "'");
|
||||
rhs.tag ("REGEX");
|
||||
}
|
||||
else if (modifier == "endswith" || modifier == "right")
|
||||
{
|
||||
op.attribute ("raw", "~");
|
||||
op.tag ("OP");
|
||||
rhs.attribute ("raw", "'" + value + "$'");
|
||||
rhs.tag ("REGEX");
|
||||
}
|
||||
else if (modifier == "word")
|
||||
{
|
||||
op.attribute ("raw", "~");
|
||||
op.tag ("OP");
|
||||
#if defined (DARWIN)
|
||||
rhs.attribute ("raw", value);
|
||||
#elif defined (SOLARIS)
|
||||
|
@ -1218,7 +1208,6 @@ void CLI::desugarFilterAttributeModifiers ()
|
|||
else if (modifier == "noword")
|
||||
{
|
||||
op.attribute ("raw", "!~");
|
||||
op.tag ("OP");
|
||||
#if defined (DARWIN)
|
||||
rhs.attribute ("raw", value);
|
||||
#elif defined (SOLARIS)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue