--- report.cpp.orig 2009-08-25 20:08:34.000000000 +0200 +++ report.cpp 2009-08-25 20:08:56.000000000 +0200 @@ -497,9 +497,6 @@ << std::endl; } - if (! tasks.size ()) - out << "No matches." << std::endl; - return out.str (); } --- custom.cpp.orig 2009-08-25 20:08:29.000000000 +0200 +++ custom.cpp 2009-08-25 20:08:52.000000000 +0200 @@ -547,9 +547,6 @@ << table.rowCount () << (table.rowCount () == 1 ? " task" : " tasks") << std::endl; - else - out << "No matches." - << std::endl; return out.str (); } --- Context.cpp.orig 2009-08-25 20:08:43.000000000 +0200 +++ Context.cpp 2009-08-25 20:10:25.000000000 +0200 @@ -126,6 +126,7 @@ //////////////////////////////////////////////////////////////////////////////// int Context::run () { + int rc = 0; Timer t ("Context::run"); std::string output; @@ -161,7 +162,12 @@ std::cout << *h << std::endl; // Dump the report output. - std::cout << output; + if (output.length()) + std::cout << output; + else { + std::cout << "No matches." << std::endl; + rc = 1; + } // Dump all footnotes. foreach (f, footnotes) @@ -170,7 +176,7 @@ else std::cout << *f << std::endl; - return 0; + return rc; } ////////////////////////////////////////////////////////////////////////////////