From 3bed6bb573fb092f6014ca79e38bcd7760c6ae3f Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sat, 20 Jun 2009 14:14:51 -0400 Subject: [PATCH] Enhancements - config variables, debug - "debug" now considered a valid configuration variable. - "alias.*" now considered a valid configuration variable. - Moved some messages over to use Context::debug. --- src/Context.cpp | 10 +++++----- src/TDB.cpp | 2 +- src/command.cpp | 19 ++++++++++--------- 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/src/Context.cpp b/src/Context.cpp index e61140251..d60e1ad55 100644 --- a/src/Context.cpp +++ b/src/Context.cpp @@ -547,7 +547,7 @@ void Context::autoFilter (Task& t, Filter& f) foreach (word, words) { f.push_back (Att ("description", "has", *word)); - header ("auto filter: " + att->first + ".has:" + *word); + debug ("auto filter: " + att->first + ".has:" + *word); } } @@ -555,7 +555,7 @@ void Context::autoFilter (Task& t, Filter& f) else if (att->first == "project") { f.push_back (Att ("project", "startswith", att->second.value ())); - header ("auto filter: " + att->first + ".startswith:" + att->second.value ()); + debug ("auto filter: " + att->first + ".startswith:" + att->second.value ()); } // The limit attribute does not participate in filtering, and needs to be @@ -571,7 +571,7 @@ void Context::autoFilter (Task& t, Filter& f) att->first != "tags") { f.push_back (att->second); - header ("auto filter: " + att->first + ":" + att->second.value ()); + debug ("auto filter: " + att->first + ":" + att->second.value ()); } } @@ -579,14 +579,14 @@ void Context::autoFilter (Task& t, Filter& f) foreach (tag, tagAdditions) { f.push_back (Att ("tags", "has", *tag)); - header ("auto filter: +" + *tag); + debug ("auto filter: +" + *tag); } // Include tagRemovals. foreach (tag, tagRemovals) { f.push_back (Att ("tags", "hasnt", *tag)); - header ("auto filter: -" + *tag); + debug ("auto filter: -" + *tag); } } diff --git a/src/TDB.cpp b/src/TDB.cpp index e4820eb6e..923d6d3c6 100644 --- a/src/TDB.cpp +++ b/src/TDB.cpp @@ -178,7 +178,7 @@ int TDB::load (std::vector & tasks, Filter& filter) numberStatusClauses != numberSimpleStatusClauses) loadCompleted (tasks, filter); else - context.header ("load optimization short circuit"); + context.debug ("load optimization short circuit"); #else loadCompleted (tasks, filter); #endif diff --git a/src/command.cpp b/src/command.cpp index abf6221af..99a410ff0 100644 --- a/src/command.cpp +++ b/src/command.cpp @@ -390,14 +390,14 @@ std::string handleVersion () " blanklines color color.active color.due color.overdue color.pri.H " "color.pri.L color.pri.M color.pri.none color.recurring color.tagged " "color.footnote color.header color.message color.debug confirmation curses " - "data.location dateformat default.command default.priority defaultwidth " - "displayweeknumber due echo.command locale locking monthsperline nag next " - "project shadow.command shadow.file shadow.notify weekstart editor " - "import.synonym.id import.synonym.uuid import.synonym.status " - "import.synonym.tags import.synonym.entry import.synonym.start " - "import.synonym.due import.synonym.recur import.synonym.end " - "import.synonym.project import.synonym.priority import.synonym.fg " - "import.synonym.bg import.synonym.description "; + "data.location dateformat debug default.command default.priority " + "defaultwidth displayweeknumber due echo.command locale locking " + "monthsperline nag next project shadow.command shadow.file shadow.notify " + "weekstart editor import.synonym.id import.synonym.uuid " + "import.synonym.status import.synonym.tags import.synonym.entry " + "import.synonym.start import.synonym.due import.synonym.recur " + "import.synonym.end import.synonym.project import.synonym.priority " + "import.synonym.fg import.synonym.bg import.synonym.description "; // This configuration variable is supported, but not documented. It exists // so that unit tests can force color to be on even when the output from task @@ -417,7 +417,8 @@ std::string handleVersion () if (i->substr (0, 14) != "color.keyword." && i->substr (0, 14) != "color.project." && i->substr (0, 10) != "color.tag." && - i->substr (0, 7) != "report.") + i->substr (0, 7) != "report." && + i->substr (0, 6) != "alias.") { unrecognized.push_back (*i); }