mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
CmdGet: Added rules back
This commit is contained in:
parent
e964ea5076
commit
6171003466
5 changed files with 6 additions and 4 deletions
|
@ -35,6 +35,7 @@
|
|||
// Іdentify DOM references in cli, provide space-separated results.
|
||||
int CmdGet (
|
||||
const CLI& cli,
|
||||
Rules& rules,
|
||||
Database& database)
|
||||
{
|
||||
std::vector <std::string> results;
|
||||
|
@ -45,7 +46,7 @@ int CmdGet (
|
|||
{
|
||||
std::string reference = arg.attribute ("raw");
|
||||
std::string value;
|
||||
if (! domGet (database, reference, value))
|
||||
if (! domGet (database, rules, reference, value))
|
||||
throw format ("DOM reference '{1}' is not valid.", reference);
|
||||
|
||||
results.push_back (value);
|
||||
|
|
|
@ -41,7 +41,7 @@ int CmdDiagnostics ( Rules&, Database&, const Extensions&);
|
|||
int CmdExport (const CLI&, Rules&, Database& );
|
||||
int CmdExtensions ( Rules&, const Extensions&);
|
||||
int CmdGaps (const CLI&, Rules&, Database& );
|
||||
int CmdGet (const CLI&, Database& );
|
||||
int CmdGet (const CLI&, Rules&, Database& );
|
||||
int CmdHelpUsage ( );
|
||||
int CmdHelp (const CLI& );
|
||||
int CmdImport ( );
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
bool domGet (
|
||||
Database& database,
|
||||
const Rules& rules,
|
||||
const std::string& reference,
|
||||
std::string& value)
|
||||
{
|
||||
|
|
|
@ -265,7 +265,7 @@ int dispatchCommand (
|
|||
else if (command == "export") status = CmdExport (cli, rules, database );
|
||||
else if (command == "extensions") status = CmdExtensions ( rules, extensions);
|
||||
else if (command == "gaps") status = CmdGaps (cli, rules, database );
|
||||
else if (command == "get") status = CmdGet (cli, database );
|
||||
else if (command == "get") status = CmdGet (cli, rules, database );
|
||||
else if (command == "help") status = CmdHelp (cli );
|
||||
else if (command == "import") status = CmdImport ( );
|
||||
else if (command == "join") status = CmdJoin (cli, rules, database );
|
||||
|
|
|
@ -91,6 +91,6 @@ std::string escape (const std::string&, int);
|
|||
std::string quoteIfNeeded (const std::string&);
|
||||
|
||||
// dom.cpp
|
||||
bool domGet (Database&, const std::string&, std::string&);
|
||||
bool domGet (Database&, const Rules&, const std::string&, std::string&);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue