mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Filter
- rc.debug=1 propagates to Eval::debug. - Corrected comments.
This commit is contained in:
parent
899e65714a
commit
dea9d3f4ef
3 changed files with 9 additions and 2 deletions
|
@ -43,6 +43,7 @@
|
|||
|
||||
extern Context context;
|
||||
|
||||
// TODO Tie this to rc.abbreviation.minimum.
|
||||
static const int minimumMatchLength = 3;
|
||||
|
||||
// Alias expansion limit. Any more indicates some kind of error.
|
||||
|
@ -159,7 +160,7 @@ void A3t::entity (const std::string& name, const std::string& value)
|
|||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Search for 'value' in _entities, return category and canonicalized value.
|
||||
// Search for 'value' in _entities category, return canonicalized value.
|
||||
bool A3t::canonicalize (
|
||||
std::string& canonicalized,
|
||||
const std::string& category,
|
||||
|
|
|
@ -92,6 +92,9 @@ void Filter::subset (const std::vector <Task>& input, std::vector <Task>& output
|
|||
eval.addSource (domSource);
|
||||
eval.compileExpression (filterExpr);
|
||||
|
||||
if (context.config.getBoolean ("debug"))
|
||||
eval.debug ();
|
||||
|
||||
std::vector <Task>::const_iterator task;
|
||||
for (task = input.begin (); task != input.end (); ++task)
|
||||
{
|
||||
|
@ -144,6 +147,9 @@ void Filter::subset (std::vector <Task>& output)
|
|||
eval.addSource (domSource);
|
||||
eval.compileExpression (filterExpr);
|
||||
|
||||
if (context.config.getBoolean ("debug"))
|
||||
eval.debug ();
|
||||
|
||||
output.clear ();
|
||||
std::vector <Task>::const_iterator task;
|
||||
|
||||
|
|
|
@ -49,8 +49,8 @@ int CmdCount::execute (std::string& output)
|
|||
{
|
||||
// Apply filter.
|
||||
handleRecurrence ();
|
||||
std::vector <Task> filtered;
|
||||
Filter filter;
|
||||
std::vector <Task> filtered;
|
||||
filter.subset (filtered);
|
||||
context.tdb2.commit ();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue