mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Bug Fix - #333 duplicate command should display the ID of the created task
- Added missing "Created task" output to duplicate command (thanks to Cory Donnelly).
This commit is contained in:
parent
b246fae889
commit
7f11f1b560
1 changed files with 12 additions and 3 deletions
|
@ -1140,12 +1140,21 @@ int handleDuplicate (std::string &outs)
|
|||
++count;
|
||||
}
|
||||
|
||||
if (context.config.get ("echo.command", true))
|
||||
{
|
||||
out << "Duplicated " << count << " task" << (count == 1 ? "" : "s") << std::endl;
|
||||
#ifdef FEATURE_NEW_ID
|
||||
// All this, just for an id number.
|
||||
std::vector <Task> all;
|
||||
Filter none;
|
||||
context.tdb.loadPending (all, none);
|
||||
out << "Created task " << context.tdb.nextId () << std::endl;
|
||||
#endif
|
||||
}
|
||||
|
||||
context.tdb.commit ();
|
||||
context.tdb.unlock ();
|
||||
|
||||
if (context.config.get ("echo.command", true))
|
||||
out << "Duplicated " << count << " task" << (count == 1 ? "" : "s") << std::endl;
|
||||
|
||||
outs = out.str ();
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue