bug #1508 configurable color output

This commit is contained in:
Nicolas Appriou 2014-02-01 11:12:44 +01:00 committed by Paul Beckingham
parent c7ebe6b3e2
commit 9c0e4053c4
2 changed files with 7 additions and 4 deletions

View file

@ -160,7 +160,8 @@ std::string Config::_defaults =
#ifdef LINUX
"color.header=color3 # Color of header messages\n"
"color.footnote=color3 # Color of footnote messages\n"
"color.error=color3 # Color of error messages\n"
"color.warning=color3 # Color of warning messages\n"
"color.error=color1 # Color of error messages\n"
"color.debug=color3 # Color of diagnostic output\n"
"color.alternate=on color233 # Alternate color for line coloring\n"
"\n"
@ -215,7 +216,8 @@ std::string Config::_defaults =
#else
"color.header=yellow # Color of header messages\n"
"color.footnote=yellow # Color of footnote messages\n"
"color.error=yellow # Color of error messages\n"
"color.warning=yellow # Color of warning messages\n"
"color.error=red # Color of error messages\n"
"color.debug=yellow # Color of diagnostic output\n"
"color.alternate= # Alternate color for line coloring\n"
"\n"

View file

@ -99,6 +99,7 @@ int CmdShow::execute (std::string& output)
" color.deleted"
" color.due"
" color.due.today"
" color.warning"
" color.error"
" color.footnote"
" color.header"
@ -257,8 +258,8 @@ int CmdShow::execute (std::string& output)
view.add (Column::factory ("string", STRING_CMD_SHOW_CONF_VAR));
view.add (Column::factory ("string", STRING_CMD_SHOW_CONF_VALUE));
Color error ("bold white on red");
Color warning ("black on yellow");
Color error (context.config.get ("color.error"));
Color warning (context.config.get ("color.warning"));
bool issue_error = false;
bool issue_warning = false;