MCPcopy Create free account
hub / github.com/GothenburgBitFactory/taskwarrior / execute

Method execute

src/commands/CmdUrgency.cpp:55–76  ·  view source on GitHub ↗

///////////////////////////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

53
54////////////////////////////////////////////////////////////////////////////////
55int CmdUrgency::execute(std::string& output) {
56 // Apply filter.
57 Filter filter;
58 std::vector<Task> filtered;
59 filter.subset(filtered);
60
61 if (filtered.size() == 0) {
62 Context::getContext().footnote("No tasks specified.");
63 return 1;
64 }
65
66 // Display urgency for the selected tasks.
67 std::stringstream out;
68 for (auto& task : filtered) {
69 out << format("task {1} urgency {2}", task.identifier(),
70 Lexer::trim(format(task.urgency(), 6, 3)))
71 << '\n';
72 }
73
74 output = out.str();
75 return 0;
76}
77
78////////////////////////////////////////////////////////////////////////////////

Callers

nothing calls this directly

Calls 4

subsetMethod · 0.80
footnoteMethod · 0.80
identifierMethod · 0.80
urgencyMethod · 0.80

Tested by

no test coverage detected