mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Verbose
- The 'verbose' configuration variable now accepts a specific list of items to be verbose about. See taskrc(5).
This commit is contained in:
parent
557440db0c
commit
14bea5e1b4
6 changed files with 17 additions and 9 deletions
|
@ -30,6 +30,8 @@
|
||||||
+ New 'color.label' for colorizing the report column labels.
|
+ New 'color.label' for colorizing the report column labels.
|
||||||
+ The 'blanklines' configuration variable now replaced by the 'verbose' token
|
+ The 'blanklines' configuration variable now replaced by the 'verbose' token
|
||||||
'blanklines'.
|
'blanklines'.
|
||||||
|
+ The 'verbose' configuration variable now accepts a specific list of items to
|
||||||
|
be verbose about. See taskrc(5).
|
||||||
|
|
||||||
# Tracked Features, sorted by ID.
|
# Tracked Features, sorted by ID.
|
||||||
+ Added feature #330, which supports the 'inverse' color attribute.
|
+ Added feature #330, which supports the 'inverse' color attribute.
|
||||||
|
|
2
NEWS
2
NEWS
|
@ -15,7 +15,7 @@ New Features in taskwarrior 2.0.0
|
||||||
project, due date and description sorted by urgency).
|
project, due date and description sorted by urgency).
|
||||||
- Performance enhancements.
|
- Performance enhancements.
|
||||||
- New 'next' report, that gauges urgency and reports the most urgent tasks.
|
- 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
|
Please refer to the ChangeLog file for full details. There are too many to
|
||||||
list here.
|
list here.
|
||||||
|
|
|
@ -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
|
Alternatively, you can specify a comma-separated list of verbosity tokens that
|
||||||
control specific occasions when output is generated. This list may contain:
|
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,
|
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.
|
and the "off" setting is equivalent to none of the tokens being specified.
|
||||||
|
|
|
@ -71,7 +71,8 @@ std::string Config::defaults =
|
||||||
"# Miscellaneous\n"
|
"# Miscellaneous\n"
|
||||||
"verbose=yes # Provide extra feedback\n"
|
"verbose=yes # Provide extra feedback\n"
|
||||||
"#verbose=no # Provide minimal 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"
|
"confirmation=yes # Confirmation on delete, big changes\n"
|
||||||
"echo.command=yes # Details on command just run\n"
|
"echo.command=yes # Details on command just run\n"
|
||||||
"annotations=full # Level of verbosity for annotations: full, sparse or none\n"
|
"annotations=full # Level of verbosity for annotations: full, sparse or none\n"
|
||||||
|
|
|
@ -210,7 +210,7 @@ int Context::run ()
|
||||||
rc = 3;
|
rc = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Dump all debug messages.
|
// Dump all debug messages, controlled by rc.debug.
|
||||||
if (config.getBoolean ("debug"))
|
if (config.getBoolean ("debug"))
|
||||||
foreach (d, debugMessages)
|
foreach (d, debugMessages)
|
||||||
if (color ())
|
if (color ())
|
||||||
|
@ -218,8 +218,8 @@ int Context::run ()
|
||||||
else
|
else
|
||||||
std::cout << *d << "\n";
|
std::cout << *d << "\n";
|
||||||
|
|
||||||
// Dump all headers.
|
// Dump all headers, controlled by 'header' verbosity token.
|
||||||
if (config.getBoolean ("verbose"))
|
if (verbose ("header"))
|
||||||
foreach (h, headers)
|
foreach (h, headers)
|
||||||
if (color ())
|
if (color ())
|
||||||
std::cout << colorizeHeader (*h) << "\n";
|
std::cout << colorizeHeader (*h) << "\n";
|
||||||
|
@ -229,8 +229,8 @@ int Context::run ()
|
||||||
// Dump the report output.
|
// Dump the report output.
|
||||||
std::cout << output;
|
std::cout << output;
|
||||||
|
|
||||||
// Dump all footnotes.
|
// Dump all footnotes, controlled by 'footnote' verbosity token.
|
||||||
if (config.getBoolean ("verbose"))
|
if (verbose ("footnote"))
|
||||||
foreach (f, footnotes)
|
foreach (f, footnotes)
|
||||||
if (color ())
|
if (color ())
|
||||||
std::cout << colorizeFootnote (*f) << "\n";
|
std::cout << colorizeFootnote (*f) << "\n";
|
||||||
|
@ -355,6 +355,7 @@ bool Context::color ()
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// TODO Support verbosity levels.
|
||||||
bool Context::verbose (const std::string& token)
|
bool Context::verbose (const std::string& token)
|
||||||
{
|
{
|
||||||
if (! verbosity.size ())
|
if (! verbosity.size ())
|
||||||
|
|
|
@ -147,7 +147,8 @@ void Column::renderHeader (
|
||||||
int width,
|
int width,
|
||||||
Color& color)
|
Color& color)
|
||||||
{
|
{
|
||||||
if (_label != "")
|
if (context.verbose ("label") &&
|
||||||
|
_label != "")
|
||||||
{
|
{
|
||||||
// Create a basic label.
|
// Create a basic label.
|
||||||
std::string header;
|
std::string header;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue