mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Enhancement - color.alternate
- The 'stats' and 'info' reports now obey color.alternate.
This commit is contained in:
parent
30cb5fa4f4
commit
5cecc3d772
2 changed files with 17 additions and 0 deletions
|
@ -17,6 +17,7 @@
|
|||
on default values.
|
||||
+ Special tags 'nocal', 'nocolor' and 'nonag' are implemented.
|
||||
+ The 'tags' command highlights special tags.
|
||||
+ The 'stats' and 'info' reports not obey color.alternate.
|
||||
+ Fixed bug #427, preventing the task edit command to parse annotation
|
||||
dates with spaces.
|
||||
+ Fixed bug #433, making task command output more consistent.
|
||||
|
|
|
@ -609,6 +609,14 @@ int handleInfo (std::string &outs)
|
|||
table.addCell (row, 1, color);
|
||||
}
|
||||
|
||||
// If an alternating row color is specified, notify the table.
|
||||
if (context.config.getBoolean ("color") || context.config.getBoolean ("_forcecolor"))
|
||||
{
|
||||
Color alternate (context.config.get ("color.alternate"));
|
||||
if (alternate.nontrivial ())
|
||||
table.setTableAlternateColor (alternate);
|
||||
}
|
||||
|
||||
out << optionalBlankLine ()
|
||||
<< table.render ()
|
||||
<< std::endl;
|
||||
|
@ -2506,6 +2514,14 @@ int handleReportStats (std::string &outs)
|
|||
table.addCell (row, 1, value.str ());
|
||||
}
|
||||
|
||||
// If an alternating row color is specified, notify the table.
|
||||
if (context.config.getBoolean ("color") || context.config.getBoolean ("_forcecolor"))
|
||||
{
|
||||
Color alternate (context.config.get ("color.alternate"));
|
||||
if (alternate.nontrivial ())
|
||||
table.setTableAlternateColor (alternate);
|
||||
}
|
||||
|
||||
out << optionalBlankLine ()
|
||||
<< table.render ()
|
||||
<< optionalBlankLine ();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue