From ac431ac5c933bb409ca43b16ed49e56ab8851ff8 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Mon, 12 Apr 2010 18:19:35 -0400 Subject: [PATCH] Enhancement - Applied patch from Cory Donnelly to provide default current date to the edit command, for new annotations. --- ChangeLog | 3 +++ src/edit.cpp | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 109125ae3..8644d9551 100644 --- a/ChangeLog +++ b/ChangeLog @@ -7,6 +7,9 @@ + Summary report bar colors can now be specified with color.summary.bar and color.summary.background configuration variables. + The configure script is more portable (thanks to Emil Sköldberg). + + Updated task-faq.5 man page. + + The 'edit' command now conveniently fills in the current date for new + annotations. ------ old releases ------------------------------ diff --git a/src/edit.cpp b/src/edit.cpp index b094193e4..b4db2477d 100644 --- a/src/edit.cpp +++ b/src/edit.cpp @@ -168,9 +168,11 @@ static std::string formatTask (Task task) << " " << anno->value () << std::endl; } - before << " Annotation: " << std::endl - << " Annotation: " << std::endl + Date now; + before << " Annotation: " << now.toString (context.config.get ("dateformat")) << " " << std::endl + << " Annotation: " << now.toString (context.config.get ("dateformat")) << " " << std::endl << "# End" << std::endl; + return before.str (); }