From 18fabf11abdc607170948598a67ebfc880d58f1c Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Wed, 6 Jul 2016 08:08:36 -0400 Subject: [PATCH] CmdSummary: More descriptive feedback when no data is found --- src/commands/CmdSummary.cpp | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/src/commands/CmdSummary.cpp b/src/commands/CmdSummary.cpp index 48a825e7..0a0e67fe 100644 --- a/src/commands/CmdSummary.cpp +++ b/src/commands/CmdSummary.cpp @@ -31,6 +31,7 @@ #include #include #include +#include #include // 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 tags; + for (auto& tag : filter.tags ()) + tags.push_back (quoteIfNeeded (tag)); + + std::cout << " tagged with " << join (", ", tags); + } + + std::cout << ".\n"; + } } return 0;