mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
CmdEdit
- Converted from A3 to Filter.
This commit is contained in:
parent
468e02c73b
commit
8a92c36916
1 changed files with 5 additions and 5 deletions
|
@ -32,6 +32,7 @@
|
|||
#include <unistd.h>
|
||||
#include <OldDuration.h>
|
||||
#include <Context.h>
|
||||
#include <Filter.h>
|
||||
#include <i18n.h>
|
||||
#include <text.h>
|
||||
#include <util.h>
|
||||
|
@ -57,21 +58,20 @@ CmdEdit::CmdEdit ()
|
|||
// wrench. To be used sparingly.
|
||||
int CmdEdit::execute (std::string& output)
|
||||
{
|
||||
int rc = 0;
|
||||
|
||||
// Filter the tasks.
|
||||
handleRecurrence ();
|
||||
Filter filter;
|
||||
std::vector <Task> filtered;
|
||||
filter (filtered);
|
||||
filter.subset (filtered);
|
||||
|
||||
// Find number of matching tasks. Skip recurring parent tasks.
|
||||
// Find number of matching tasks.
|
||||
std::vector <Task>::iterator task;
|
||||
for (task = filtered.begin (); task != filtered.end (); ++task)
|
||||
if (editFile (*task))
|
||||
context.tdb2.modify (*task);
|
||||
|
||||
context.tdb2.commit ();
|
||||
return rc;
|
||||
return 0;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue