diff --git a/ChangeLog b/ChangeLog index 397653a07..446e7c8c0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -39,6 +39,7 @@ + New, more flexible, more consistent, grep-able file format. + If task is renamed to "cal", or there is a symlink to task called "cal", then task can act as a replacement for the Unix "cal" command. + + The "tags" report now shows the tag usage count. Add: att mods @@ -49,10 +50,15 @@ Add: wait: report.waiting report.all - debug mode new colorization support many, many new unit tests + + Now supports a debug mode that can be used to generate helpful information + when reporting a problem. Just run the command with "task rc.debug:on ..." + and diagnostics will be generated that will help pinpoint a problem. + + The new "undo" command replaces the old "undo" and "undelete" command + with a complete undo stack that can rollback all changes. + ------ old releases ------------------------------ 1.7.1 (6/8/2009) diff --git a/src/Context.cpp b/src/Context.cpp index f13ea174d..c9bc1bf91 100644 --- a/src/Context.cpp +++ b/src/Context.cpp @@ -87,13 +87,6 @@ void Context::initialize () { Timer t ("Context::initialize"); - // Set up randomness. -#ifdef HAVE_SRANDOM - srandom (time (NULL)); -#else - srand (time (NULL)); -#endif - // Load the configuration file from the home directory. If the file cannot // be found, offer to create a sample one. loadCorrectConfigFile (); diff --git a/src/command.cpp b/src/command.cpp index d9fe5d09f..1d596ff4a 100644 --- a/src/command.cpp +++ b/src/command.cpp @@ -137,7 +137,6 @@ std::string handleProjects () } table.setColumnJustification (1, Table::right); - table.setDateFormat (context.config.get ("dateformat", "m/d/Y")); foreach (i, unique) { @@ -177,27 +176,50 @@ std::string handleTags () // Scan all the tasks for their project name, building a map using project // names as keys. - std::map unique; + std::map unique; foreach (t, tasks) { std::vector tags; t->getTags (tags); foreach (tag, tags) - unique[*tag] = ""; + if (unique.find (*tag) != unique.end ()) + unique[*tag]++; + else + unique[*tag] = 1; } - // Render a list of tag names from the map. - out << optionalBlankLine (); - foreach (i, unique) - out << i->first << std::endl; - if (unique.size ()) + { + // Render a list of tags names from the map. + Table table; + table.addColumn ("Tag"); + table.addColumn ("Count"); + + if (context.config.get ("color", true) || + context.config.get (std::string ("_forcecolor"), false)) + { + table.setColumnUnderline (0); + table.setColumnUnderline (1); + } + + table.setColumnJustification (1, Table::right); + + foreach (i, unique) + { + int row = table.addRow (); + table.addCell (row, 0, i->first); + table.addCell (row, 1, i->second); + } + out << optionalBlankLine () + << table.render () + << optionalBlankLine () << unique.size () << (unique.size () == 1 ? " tag" : " tags") << " (" << quantity << (quantity == 1 ? " task" : " tasks") << ")" << std::endl; + } else out << "No tags." << std::endl;