- The 'verbose' configuration variable was not considered valid.
This commit is contained in:
Paul Beckingham 2010-08-23 23:09:53 -04:00
parent a1488d0504
commit 3cfcc9fb6b

View file

@ -743,7 +743,7 @@ int handleShow (std::string &outs)
"project shadow.command shadow.file shadow.notify weekstart editor " "project shadow.command shadow.file shadow.notify weekstart editor "
"import.synonym.id import.synonym.uuid complete.all.projects complete.all.tags " "import.synonym.id import.synonym.uuid complete.all.projects complete.all.tags "
"search.case.sensitive hooks active.indicator tag.indicator recurrence.indicator " "search.case.sensitive hooks active.indicator tag.indicator recurrence.indicator "
"recurrence.limit list.all.projects list.all.tags undo.style " "recurrence.limit list.all.projects list.all.tags undo.style verbose "
#ifdef FEATURE_SHELL #ifdef FEATURE_SHELL
"shell.prompt " "shell.prompt "
#endif #endif
@ -1941,20 +1941,37 @@ int handleColor (std::string &outs)
std::vector <std::string> all; std::vector <std::string> all;
context.config.all (all); context.config.all (all);
Table table;
table.addColumn ("Color");
table.addColumn ("Definition");
if (context.config.getBoolean ("color") ||
context.config.getBoolean ("_forcecolor"))
{
table.setColumnUnderline (0);
table.setColumnUnderline (1);
}
foreach (item, all) foreach (item, all)
{ {
// Skip items with 'color' in their name, that are not referring to
// actual colors.
if (*item != "_forcecolor" && if (*item != "_forcecolor" &&
*item != "color" && *item != "color" &&
item->find ("color") != std::string::npos) item->find ("color") != std::string::npos)
{ {
out << " " int row = table.addRow ();
<< Color::colorize (" " + *item + " ", table.addCell (row, 0, *item);
context.config.get (*item)) table.addCell (row, 1, context.config.get (*item));
<< std::endl; table.setRowColor (row, context.config.get (*item));
} }
} }
out << std::endl; out << optionalBlankLine ()
<< table.render ()
<< optionalBlankLine ()
<< std::endl;
} }
// If there is something in the description, then assume that is a color, // If there is something in the description, then assume that is a color,