diff --git a/ChangeLog b/ChangeLog index 75386ef0e..f50e46b97 100644 --- a/ChangeLog +++ b/ChangeLog @@ -7,6 +7,8 @@ color.burndown.done colors. + Added feature #546, which is a 'count' command that counts tasks, and is intended to help scripts that manipulate task output. + + Fixed bug #515, which displayed an incorrect message after duplicating a + non-existent task (thanks to Peter De Poorter). + Fixed bug #529, where the 'depends' attribute was not mentioned in the task man page (thanks to Dirk Deimeke). + Fixed bug #535 which omitted the holidays-NO.rc file from the packages diff --git a/src/command.cpp b/src/command.cpp index 44de0e87f..3298c2841 100644 --- a/src/command.cpp +++ b/src/command.cpp @@ -2011,7 +2011,12 @@ int handleDuplicate (std::string& outs) ++count; } - if (context.config.getBoolean ("echo.command")) + if (tasks.size () == 0) + { + out << "No matches.\n"; + rc = 1; + } + else if (context.config.getBoolean ("echo.command")) { #ifdef FEATURE_NEW_ID // All this, just for an id number. diff --git a/src/report.cpp b/src/report.cpp index 53c872857..968ae932a 100644 --- a/src/report.cpp +++ b/src/report.cpp @@ -672,7 +672,8 @@ int handleInfo (std::string& outs) << "\n"; } - if (! tasks.size ()) { + if (! tasks.size ()) + { out << "No matches.\n"; rc = 1; }