Bug #460
- Added rc.verbose that for now, just controls whether header and footer messages are displayed, but will ultimately control much more.
This commit is contained in:
@@ -27,7 +27,7 @@ $ task rc:<directory-path>/.taskrc
|
|||||||
.RE
|
.RE
|
||||||
|
|
||||||
Individual option can be overridden by using the
|
Individual option can be overridden by using the
|
||||||
.I rc.<name>:
|
.I rc.<name>:
|
||||||
attribute when running task:
|
attribute when running task:
|
||||||
|
|
||||||
.RS
|
.RS
|
||||||
@@ -109,7 +109,8 @@ statement:
|
|||||||
include <path/to/the/configuration/file/to/be/included>
|
include <path/to/the/configuration/file/to/be/included>
|
||||||
.RE
|
.RE
|
||||||
|
|
||||||
By using include files you can divide your main configuration file into several ones containing just the relevant configuration data like colors, etc.
|
By using include files you can divide your main configuration file into several
|
||||||
|
ones containing just the relevant configuration data like colors, etc.
|
||||||
|
|
||||||
There are two excellent uses of includes in your .taskrc, shown here:
|
There are two excellent uses of includes in your .taskrc, shown here:
|
||||||
|
|
||||||
@@ -172,6 +173,10 @@ code. If not specified, task will assume en-US. If specified, task will locate
|
|||||||
the correct file of localized strings and proceed. It is an error to specify a
|
the correct file of localized strings and proceed. It is an error to specify a
|
||||||
locale for which there is no strings file.
|
locale for which there is no strings file.
|
||||||
|
|
||||||
|
.TP
|
||||||
|
.B verbose=yes
|
||||||
|
Controls some of the verbosity of task.
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B confirmation=yes
|
.B confirmation=yes
|
||||||
May be "yes" or "no", and determines whether task will ask for confirmation
|
May be "yes" or "no", and determines whether task will ask for confirmation
|
||||||
@@ -476,7 +481,9 @@ variable.
|
|||||||
.RE
|
.RE
|
||||||
|
|
||||||
.RS
|
.RS
|
||||||
The following holidays are computed automatically: Good Friday (goodfriday), Easter (easter), Easter monday (eastermonday), Ascension (ascension), Pentecost (pentecost). The date for these holidays is the given keyword:
|
The following holidays are computed automatically: Good Friday (goodfriday),
|
||||||
|
Easter (easter), Easter monday (eastermonday), Ascension (ascension), Pentecost
|
||||||
|
(pentecost). The date for these holidays is the given keyword:
|
||||||
.RE
|
.RE
|
||||||
|
|
||||||
.RS
|
.RS
|
||||||
|
|||||||
@@ -67,6 +67,7 @@ std::string Config::defaults =
|
|||||||
"#editor=vi # Preferred text editor\n"
|
"#editor=vi # Preferred text editor\n"
|
||||||
"\n"
|
"\n"
|
||||||
"# Miscellaneous\n"
|
"# Miscellaneous\n"
|
||||||
|
"verbose=yes # Provide extra feedback\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"
|
||||||
|
|||||||
@@ -170,11 +170,12 @@ int Context::run ()
|
|||||||
|
|
||||||
// Dump all headers.
|
// Dump all headers.
|
||||||
hooks.trigger ("pre-header");
|
hooks.trigger ("pre-header");
|
||||||
foreach (h, headers)
|
if (config.getBoolean ("verbose"))
|
||||||
if (config.getBoolean ("color") || config.getBoolean ("_forcecolor"))
|
foreach (h, headers)
|
||||||
std::cout << colorizeHeader (*h) << std::endl;
|
if (config.getBoolean ("color") || config.getBoolean ("_forcecolor"))
|
||||||
else
|
std::cout << colorizeHeader (*h) << std::endl;
|
||||||
std::cout << *h << std::endl;
|
else
|
||||||
|
std::cout << *h << std::endl;
|
||||||
hooks.trigger ("post-header");
|
hooks.trigger ("post-header");
|
||||||
|
|
||||||
// Dump the report output.
|
// Dump the report output.
|
||||||
@@ -184,11 +185,12 @@ int Context::run ()
|
|||||||
|
|
||||||
// Dump all footnotes.
|
// Dump all footnotes.
|
||||||
hooks.trigger ("pre-footnote");
|
hooks.trigger ("pre-footnote");
|
||||||
foreach (f, footnotes)
|
if (config.getBoolean ("verbose"))
|
||||||
if (config.getBoolean ("color") || config.getBoolean ("_forcecolor"))
|
foreach (f, footnotes)
|
||||||
std::cout << colorizeFootnote (*f) << std::endl;
|
if (config.getBoolean ("color") || config.getBoolean ("_forcecolor"))
|
||||||
else
|
std::cout << colorizeFootnote (*f) << std::endl;
|
||||||
std::cout << *f << std::endl;
|
else
|
||||||
|
std::cout << *f << std::endl;
|
||||||
hooks.trigger ("post-footnote");
|
hooks.trigger ("post-footnote");
|
||||||
|
|
||||||
hooks.trigger ("pre-exit");
|
hooks.trigger ("pre-exit");
|
||||||
|
|||||||
Reference in New Issue
Block a user