- The 'verbose' configuration variable now accepts a specific list of items to
  be verbose about.  See taskrc(5).
This commit is contained in:
Paul Beckingham 2011-05-14 15:38:03 -04:00
parent 557440db0c
commit 14bea5e1b4
6 changed files with 17 additions and 9 deletions

View file

@ -30,6 +30,8 @@
+ New 'color.label' for colorizing the report column labels.
+ The 'blanklines' configuration variable now replaced by the 'verbose' token
'blanklines'.
+ The 'verbose' configuration variable now accepts a specific list of items to
be verbose about. See taskrc(5).
# Tracked Features, sorted by ID.
+ Added feature #330, which supports the 'inverse' color attribute.

2
NEWS
View file

@ -15,7 +15,7 @@ New Features in taskwarrior 2.0.0
project, due date and description sorted by urgency).
- Performance enhancements.
- New 'next' report, that gauges urgency and reports the most urgent tasks.
- The 'blanklines' configuration variable replaced by 'verbose=...' tokens.
- Fine control of verbosity through the 'verbose=' configuration variable.
Please refer to the ChangeLog file for full details. There are too many to
list here.

View file

@ -192,7 +192,10 @@ that you would see minimal output, with no help text.
Alternatively, you can specify a comma-separated list of verbosity tokens that
control specific occasions when output is generated. This list may contain:
blanklines Inserts extra blank lines in output, for clarity
blank Inserts extra blank lines in output, for clarity
header Messages that appear before report output
footnote Messages that appear after report output
label Column labels on tabular reports
Note that the "on" setting is equivalent to all the tokens being specified,
and the "off" setting is equivalent to none of the tokens being specified.

View file

@ -71,7 +71,8 @@ std::string Config::defaults =
"# Miscellaneous\n"
"verbose=yes # Provide extra feedback\n"
"#verbose=no # Provide minimal feedback\n"
"#verbose=blanklines # Provide controlled feedback\n"
"#verbose=list # Comma-separated list. May contain:\n"
"#verbose=blank,header,footnote,label\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

@ -210,7 +210,7 @@ int Context::run ()
rc = 3;
}
// Dump all debug messages.
// Dump all debug messages, controlled by rc.debug.
if (config.getBoolean ("debug"))
foreach (d, debugMessages)
if (color ())
@ -218,8 +218,8 @@ int Context::run ()
else
std::cout << *d << "\n";
// Dump all headers.
if (config.getBoolean ("verbose"))
// Dump all headers, controlled by 'header' verbosity token.
if (verbose ("header"))
foreach (h, headers)
if (color ())
std::cout << colorizeHeader (*h) << "\n";
@ -229,8 +229,8 @@ int Context::run ()
// Dump the report output.
std::cout << output;
// Dump all footnotes.
if (config.getBoolean ("verbose"))
// Dump all footnotes, controlled by 'footnote' verbosity token.
if (verbose ("footnote"))
foreach (f, footnotes)
if (color ())
std::cout << colorizeFootnote (*f) << "\n";
@ -355,6 +355,7 @@ bool Context::color ()
}
////////////////////////////////////////////////////////////////////////////////
// TODO Support verbosity levels.
bool Context::verbose (const std::string& token)
{
if (! verbosity.size ())

View file

@ -147,7 +147,8 @@ void Column::renderHeader (
int width,
Color& color)
{
if (_label != "")
if (context.verbose ("label") &&
_label != "")
{
// Create a basic label.
std::string header;