mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
CmdSummary: More descriptive feedback when no data is found
This commit is contained in:
parent
7bf725d1a8
commit
18fabf11ab
1 changed files with 22 additions and 1 deletions
|
@ -31,6 +31,7 @@
|
|||
#include <format.h>
|
||||
#include <commands.h>
|
||||
#include <timew.h>
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
|
||||
// Implemented in CmdChart.cpp.
|
||||
|
@ -142,7 +143,27 @@ int CmdSummary (
|
|||
else
|
||||
{
|
||||
if (rules.getBoolean ("verbose"))
|
||||
std::cout << "No filtered data found.\n";
|
||||
{
|
||||
std::cout << "No filtered data found";
|
||||
|
||||
if (filter.range.is_started ())
|
||||
{
|
||||
std::cout << " in the range " << filter.range.start.toISOLocalExtended ();
|
||||
if (filter.range.is_ended ())
|
||||
std::cout << " - " << filter.range.end.toISOLocalExtended ();
|
||||
}
|
||||
|
||||
if (filter.tags ().size ())
|
||||
{
|
||||
std::vector <std::string> tags;
|
||||
for (auto& tag : filter.tags ())
|
||||
tags.push_back (quoteIfNeeded (tag));
|
||||
|
||||
std::cout << " tagged with " << join (", ", tags);
|
||||
}
|
||||
|
||||
std::cout << ".\n";
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue