mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Filter: Consider presence of +PENDING tag signal to skip completed.data
This puts +PENDING at the same level of treatment as status:pending when it comes to decision whether the data processed should be pending only. The mechanism is by no means perfect and should be improved in the future.
This commit is contained in:
parent
5e87be4641
commit
523e2b40fe
1 changed files with 10 additions and 0 deletions
|
@ -214,6 +214,7 @@ bool Filter::pendingOnly () const
|
|||
int countOr = 0;
|
||||
int countXor = 0;
|
||||
int countNot = 0;
|
||||
bool pendingTag = false;
|
||||
|
||||
for (const auto& a : Context::getContext ().cli2._args)
|
||||
{
|
||||
|
@ -232,12 +233,21 @@ bool Filter::pendingOnly () const
|
|||
}
|
||||
}
|
||||
|
||||
for (const auto& word : Context::getContext ().cli2._original_args)
|
||||
{
|
||||
if (word.attribute ("raw") == "+PENDING") pendingTag = true;
|
||||
}
|
||||
|
||||
|
||||
if (countUUID)
|
||||
return false;
|
||||
|
||||
if (countOr || countXor || countNot)
|
||||
return false;
|
||||
|
||||
if (pendingTag)
|
||||
return true;
|
||||
|
||||
if (countStatus)
|
||||
{
|
||||
if (!countPending && !countWaiting && !countRecurring)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue