mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
A3t
- Implemented A3t::apply_overrides.
This commit is contained in:
parent
a91101919d
commit
5c6486427b
2 changed files with 19 additions and 0 deletions
18
src/A3t.cpp
18
src/A3t.cpp
|
@ -386,6 +386,24 @@ void A3t::get_data_location (Path& data)
|
|||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Takes all CONFIG name/value pairs and overrides configuration.
|
||||
// leaving only the plain args.
|
||||
void A3t::apply_overrides ()
|
||||
{
|
||||
std::vector <Tree*>::iterator i;
|
||||
for (i = _tree->_branches.begin (); i != _tree->_branches.end (); ++i)
|
||||
{
|
||||
if ((*i)->hasTag ("CONFIG"))
|
||||
{
|
||||
std::string name = (*i)->attribute ("name");
|
||||
std::string value = (*i)->attribute ("value");
|
||||
context.config.set (name, value);
|
||||
context.footnote (format (STRING_A3_OVERRIDE_RC, name, value));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// /pattern/
|
||||
void A3t::findPattern ()
|
||||
|
|
|
@ -47,6 +47,7 @@ public:
|
|||
void findConfigOverride ();
|
||||
void get_overrides (std::string&, File&);
|
||||
void get_data_location (Path&);
|
||||
void apply_overrides ();
|
||||
|
||||
private:
|
||||
void findBinary ();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue