mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Config: Separated configuration from defaults
This commit is contained in:
parent
9bc8643ce5
commit
a31434fd48
5 changed files with 397 additions and 423 deletions
|
@ -37,6 +37,7 @@
|
|||
#include <Table.h>
|
||||
|
||||
extern Context context;
|
||||
extern std::string configurationDefaults;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
CmdShow::CmdShow ()
|
||||
|
@ -253,7 +254,7 @@ int CmdShow::execute (std::string& output)
|
|||
// Find all the values that match the defaults, for highlighting.
|
||||
std::vector <std::string> default_values;
|
||||
Config default_config;
|
||||
default_config.setDefaults ();
|
||||
default_config.parse (configurationDefaults);
|
||||
|
||||
for (auto& i : context.config)
|
||||
if (i.second != default_config.get (i.first))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue