mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-29 17:07:19 +02:00
Verbose
- Implemented rc.verbose=on|off|list... - Migrated rc.blanklines to a verbosity token. - Updated documentation.
This commit is contained in:
parent
adc8605b06
commit
5fa77a36de
12 changed files with 65 additions and 13 deletions
|
@ -27,6 +27,7 @@
|
|||
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <algorithm>
|
||||
#include <pwd.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
@ -57,6 +58,7 @@ Context::Context ()
|
|||
, cmd ()
|
||||
, dom ()
|
||||
, use_color (true)
|
||||
, verbosity_legacy (false)
|
||||
, inShadow (false)
|
||||
, terminal_width (0)
|
||||
, terminal_height (0)
|
||||
|
@ -327,6 +329,24 @@ bool Context::color ()
|
|||
config.getBoolean ("_forcecolor");
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
bool Context::verbose (const std::string& token)
|
||||
{
|
||||
if (! verbosity.size ())
|
||||
{
|
||||
verbosity_legacy = config.getBoolean ("verbose");
|
||||
split (verbosity, config.get ("verbose"), ',');
|
||||
}
|
||||
|
||||
if (verbosity_legacy)
|
||||
return true;
|
||||
|
||||
if (std::find (verbosity.begin (), verbosity.end (), token) != verbosity.end ())
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
void Context::shadow ()
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue