mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
CLI
- Converted CmdCalc from Parser to CLI.
This commit is contained in:
parent
11d9fcb49c
commit
67581187ae
2 changed files with 2 additions and 2 deletions
|
@ -454,9 +454,9 @@ int Context::dispatch (std::string &out)
|
||||||
if (c->displays_id () && !tdb2.read_only ())
|
if (c->displays_id () && !tdb2.read_only ())
|
||||||
tdb2.gc ();
|
tdb2.gc ();
|
||||||
|
|
||||||
|
/*
|
||||||
// Only read-only commands can be run when TDB2 is read-only.
|
// Only read-only commands can be run when TDB2 is read-only.
|
||||||
// TODO Implement TDB2::read_only
|
// TODO Implement TDB2::read_only
|
||||||
/*
|
|
||||||
if (tdb2.read_only () && !c->read_only ())
|
if (tdb2.read_only () && !c->read_only ())
|
||||||
throw std::string ("");
|
throw std::string ("");
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -63,7 +63,7 @@ int CmdCalc::execute (std::string& output)
|
||||||
|
|
||||||
// Compile all the args into one expression.
|
// Compile all the args into one expression.
|
||||||
std::string expression;
|
std::string expression;
|
||||||
std::vector <std::string> words = context.parser.getWords ();
|
std::vector <std::string> words = context.cli.getWords ();
|
||||||
std::vector <std::string>::iterator word;
|
std::vector <std::string>::iterator word;
|
||||||
for (word = words.begin (); word != words.end (); ++word)
|
for (word = words.begin (); word != words.end (); ++word)
|
||||||
expression += *word + " ";
|
expression += *word + " ";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue