mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-27 19:17:19 +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
|
@ -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"
|
||||
|
|
|
@ -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 ())
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue