CmdContext: Color only used for tty

This commit is contained in:
Paul Beckingham 2015-11-15 14:29:09 -05:00
parent 30a2ab8ea8
commit 116e5adaf2

View file

@ -227,8 +227,11 @@ void CmdContext::listContexts (std::stringstream& out)
view.add (Column::factory ("string", "Definition"));
view.add (Column::factory ("string", "Active"));
Color label (context.config.get ("color.label"));
view.colorHeader (label);
if (context.color ())
{
Color label (context.config.get ("color.label"));
view.colorHeader (label);
}
std::string activeContext = context.config.get ("context");