mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
CLI2: Entity capture.
- CLI2::entity now captures all the known entities, duplicating the processing in Context for now.
This commit is contained in:
parent
96493db047
commit
22765a70cb
3 changed files with 27 additions and 1 deletions
|
@ -155,6 +155,12 @@ int Context::initialize (int argc, const char** argv)
|
|||
Command::factory (commands);
|
||||
for (auto& cmd : commands)
|
||||
{
|
||||
cli2.entity ("cmd", cmd.first);
|
||||
cli2.entity ((cmd.second->read_only () ? "readcmd" : "writecmd"), cmd.first);
|
||||
|
||||
if (cmd.first[0] == '_')
|
||||
cli2.entity ("helper", cmd.first);
|
||||
|
||||
cli.entity ("cmd", cmd.first);
|
||||
cli.entity ((cmd.second->read_only () ? "readcmd" : "writecmd"), cmd.first);
|
||||
|
||||
|
@ -169,6 +175,11 @@ int Context::initialize (int argc, const char** argv)
|
|||
////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Column::factory (columns);
|
||||
for (auto& col : columns)
|
||||
cli2.entity ("attribute", col.first);
|
||||
|
||||
cli2.entity ("pseudo", "limit");
|
||||
|
||||
for (auto& col : columns)
|
||||
cli.entity ("attribute", col.first);
|
||||
|
||||
|
@ -180,6 +191,15 @@ int Context::initialize (int argc, const char** argv)
|
|||
//
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
for (unsigned int i = 0; i < NUM_MODIFIER_NAMES; ++i)
|
||||
cli2.entity ("modifier", modifierNames[i]);
|
||||
|
||||
for (auto& op : Eval::getOperators ())
|
||||
cli2.entity ("operator", op);
|
||||
|
||||
for (auto& op : Eval::getBinaryOperators ())
|
||||
cli2.entity ("binary_operator", op);
|
||||
|
||||
for (unsigned int i = 0; i < NUM_MODIFIER_NAMES; ++i)
|
||||
cli.entity ("modifier", modifierNames[i]);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue