- Added rc.verbose that for now, just controls whether header and footer
  messages are displayed, but will ultimately control much more.
This commit is contained in:
Paul Beckingham 2010-08-10 22:10:01 -04:00
parent d2fe093107
commit c7cd2d2619
3 changed files with 23 additions and 13 deletions

View file

@ -67,6 +67,7 @@ std::string Config::defaults =
"#editor=vi # Preferred text editor\n"
"\n"
"# Miscellaneous\n"
"verbose=yes # Provide extra feedback\n"
"confirmation=yes # Confirmation on delete, big changes\n"
"echo.command=yes # Details on command just run\n"
"annotations=full # Level of verbosity for annotations: full, sparse or none\n"

View file

@ -170,11 +170,12 @@ int Context::run ()
// Dump all headers.
hooks.trigger ("pre-header");
foreach (h, headers)
if (config.getBoolean ("color") || config.getBoolean ("_forcecolor"))
std::cout << colorizeHeader (*h) << std::endl;
else
std::cout << *h << std::endl;
if (config.getBoolean ("verbose"))
foreach (h, headers)
if (config.getBoolean ("color") || config.getBoolean ("_forcecolor"))
std::cout << colorizeHeader (*h) << std::endl;
else
std::cout << *h << std::endl;
hooks.trigger ("post-header");
// Dump the report output.
@ -184,11 +185,12 @@ int Context::run ()
// Dump all footnotes.
hooks.trigger ("pre-footnote");
foreach (f, footnotes)
if (config.getBoolean ("color") || config.getBoolean ("_forcecolor"))
std::cout << colorizeFootnote (*f) << std::endl;
else
std::cout << *f << std::endl;
if (config.getBoolean ("verbose"))
foreach (f, footnotes)
if (config.getBoolean ("color") || config.getBoolean ("_forcecolor"))
std::cout << colorizeFootnote (*f) << std::endl;
else
std::cout << *f << std::endl;
hooks.trigger ("post-footnote");
hooks.trigger ("pre-exit");