mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-19 19:03:07 +02:00
Filter: Implemented ::hasModifications to detect command line modifications
This commit is contained in:
parent
6510026189
commit
7aa101de58
2 changed files with 11 additions and 0 deletions
|
@ -198,6 +198,16 @@ void Filter::subset (std::vector <Task>& output, bool applyContext /* = true */)
|
||||||
context.timer_filter.stop ();
|
context.timer_filter.stop ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
bool Filter::hasModifications ()
|
||||||
|
{
|
||||||
|
for (auto& a : context.cli2._args)
|
||||||
|
if (a.hasTag ("MODIFICATION"))
|
||||||
|
return true;
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// If the filter contains no 'or', 'xor' or 'not' operators, and only includes
|
// If the filter contains no 'or', 'xor' or 'not' operators, and only includes
|
||||||
// status values 'pending', 'waiting' or 'recurring', then the filter is
|
// status values 'pending', 'waiting' or 'recurring', then the filter is
|
||||||
|
|
|
@ -42,6 +42,7 @@ public:
|
||||||
|
|
||||||
void subset (const std::vector <Task>&, std::vector <Task>&, bool applyContext = true);
|
void subset (const std::vector <Task>&, std::vector <Task>&, bool applyContext = true);
|
||||||
void subset (std::vector <Task>&, bool applyContext = true);
|
void subset (std::vector <Task>&, bool applyContext = true);
|
||||||
|
bool hasModifications ();
|
||||||
bool pendingOnly ();
|
bool pendingOnly ();
|
||||||
void safety ();
|
void safety ();
|
||||||
void disableSafety ();
|
void disableSafety ();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue