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

Method execute

src/commands/CmdIDs.cpp:57–73  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

55
56////////////////////////////////////////////////////////////////////////////////
57int CmdIDs::execute(std::string& output) {
58 // Apply filter.
59 Filter filter;
60 std::vector<Task> filtered;
61 filter.subset(filtered);
62
63 // Find number of matching tasks.
64 std::vector<int> ids;
65 for (auto& task : filtered)
66 if (task.id) ids.push_back(task.id);
67
68 std::sort(ids.begin(), ids.end());
69 output = compressIds(ids) + '\n';
70
71 Context::getContext().headers.clear();
72 return 0;
73}
74
75////////////////////////////////////////////////////////////////////////////////
76// The vector must be sorted first. This is a modified version of the run-

Callers

nothing calls this directly

Calls 4

subsetMethod · 0.80
clearMethod · 0.80
getStatusMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected