mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Commands - _urgency
- Migrated _urgency to CmdUrgency.
This commit is contained in:
parent
9af1c71daf
commit
bd93126f4e
8 changed files with 124 additions and 39 deletions
|
@ -411,41 +411,6 @@ int handleCompletionConfig (std::string& outs)
|
|||
return 0;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Temporary command to display urgency for a task.
|
||||
int handleUrgency (std::string& outs)
|
||||
{
|
||||
// Get all the tasks.
|
||||
std::vector <Task> tasks;
|
||||
context.tdb.lock (context.config.getBoolean ("locking"));
|
||||
handleRecurrence ();
|
||||
context.tdb.loadPending (tasks, context.filter);
|
||||
context.tdb.commit ();
|
||||
context.tdb.unlock ();
|
||||
|
||||
// Filter sequence.
|
||||
context.filter.applySequence (tasks, context.sequence);
|
||||
if (tasks.size () == 0)
|
||||
{
|
||||
std::cout << "No tasks specified.\n";
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Find the task(s).
|
||||
std::stringstream out;
|
||||
foreach (task, tasks)
|
||||
{
|
||||
out << "task "
|
||||
<< task->id
|
||||
<< " urgency "
|
||||
<< task->urgency ()
|
||||
<< "\n";
|
||||
}
|
||||
|
||||
outs = out.str ();
|
||||
return 0;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
int handleQuery (std::string& outs)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue