///////////////////////////////////////////////////////////////////////////
| 53 | |
| 54 | //////////////////////////////////////////////////////////////////////////////// |
| 55 | int 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 | //////////////////////////////////////////////////////////////////////////////// |
nothing calls this directly
no test coverage detected