mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-30 02:17:21 +02:00
CLI
- Implemented ::applyOverrides. - Calls ::applyOverrides from Context.
This commit is contained in:
parent
c8dfa8f7fd
commit
9c245f838a
3 changed files with 18 additions and 1 deletions
16
src/CLI.cpp
16
src/CLI.cpp
|
@ -354,6 +354,22 @@ void CLI::analyze (bool parse /* = true */)
|
|||
context.debug ("CLI::analyze end");
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
void CLI::applyOverrides ()
|
||||
{
|
||||
std::vector <A>::const_iterator a;
|
||||
for (a = _args.begin (); a != _args.end (); ++a)
|
||||
{
|
||||
if (a->hasTag ("CONFIG"))
|
||||
{
|
||||
std::string name = a->attribute ("name");
|
||||
std::string value = a->attribute ("value");
|
||||
context.config.set (name, value);
|
||||
context.footnote (format (STRING_PARSER_OVERRIDE_RC, name, value));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
void CLI::getOverride (std::string& home, File& rc)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue