mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
CLI
- Implemented ::getLimit.
This commit is contained in:
parent
8863458879
commit
fa890f9961
2 changed files with 13 additions and 0 deletions
12
src/CLI.cpp
12
src/CLI.cpp
|
@ -475,6 +475,18 @@ std::string CLI::getCommand () const
|
|||
return "";
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
std::string CLI::getLimit () const
|
||||
{
|
||||
std::vector <A>::const_iterator a;
|
||||
for (a = _args.begin (); a != _args.end (); ++a)
|
||||
if (a->hasTag ("PSEUDO") &&
|
||||
a->attribute ("canonical") == "limit")
|
||||
return a->attribute ("value");
|
||||
|
||||
return "0";
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
const std::string CLI::dump (const std::string& title /* = "CLI Parser" */) const
|
||||
{
|
||||
|
|
|
@ -75,6 +75,7 @@ public:
|
|||
const std::vector <std::string> getModifications ();
|
||||
bool canonicalize (std::string&, const std::string&, const std::string&) const;
|
||||
std::string getCommand () const;
|
||||
std::string getLimit () const;
|
||||
const std::string dump (const std::string& title = "CLI Parser") const;
|
||||
|
||||
private:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue