mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Context
- Stuffs parser with alias definitions, from Context::loadAliases. This keeps the configuration settings apart from the Parser implementation.
This commit is contained in:
parent
08b0d573e8
commit
bc24d107d5
1 changed files with 4 additions and 0 deletions
|
@ -187,6 +187,7 @@ int Context::initialize (int argc, const char** argv)
|
|||
|
||||
// Now the entities are loaded, parsing may resume.
|
||||
parser.findBinary (); // <task|tw|t|cal|calendar>
|
||||
parser.resolveAliases ();
|
||||
parser.findCommand (); // <cmd>
|
||||
parser.findUUIDList (); // <uuid> Before findIdSequence
|
||||
parser.findIdSequence (); // <id>
|
||||
|
@ -750,6 +751,9 @@ void Context::updateVerbosity ()
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
void Context::loadAliases ()
|
||||
{
|
||||
std::map <std::string, std::string>::iterator i;
|
||||
for (i = config.begin (); i != config.end (); ++i)
|
||||
parser.alias (i->first, i->second);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue