mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-26 06:37:20 +02:00
CLI2: Add method to get MISCELLANEOUS tokens
This commit is contained in:
parent
5bbb1697af
commit
4e00106c71
2 changed files with 14 additions and 1 deletions
14
src/CLI2.cpp
14
src/CLI2.cpp
|
@ -701,7 +701,7 @@ void CLI2::prepareFilter ()
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// Return all the MISCELLANEOUS args.
|
// Return all the MISCELLANEOUS args as strings.
|
||||||
const std::vector <std::string> CLI2::getWords ()
|
const std::vector <std::string> CLI2::getWords ()
|
||||||
{
|
{
|
||||||
std::vector <std::string> words;
|
std::vector <std::string> words;
|
||||||
|
@ -721,6 +721,18 @@ const std::vector <std::string> CLI2::getWords ()
|
||||||
return words;
|
return words;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Return all the MISCELLANEOUS args.
|
||||||
|
const std::vector <A2> CLI2::getMiscellaneous ()
|
||||||
|
{
|
||||||
|
std::vector <A2> misc;
|
||||||
|
for (const auto& a : _args)
|
||||||
|
if (a.hasTag ("MISCELLANEOUS"))
|
||||||
|
misc.push_back (a);
|
||||||
|
|
||||||
|
return misc;
|
||||||
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// Search for 'value' in _entities category, return canonicalized value.
|
// Search for 'value' in _entities category, return canonicalized value.
|
||||||
bool CLI2::canonicalize (
|
bool CLI2::canonicalize (
|
||||||
|
|
|
@ -78,6 +78,7 @@ public:
|
||||||
void addContext (bool readable, bool writeable);
|
void addContext (bool readable, bool writeable);
|
||||||
void prepareFilter ();
|
void prepareFilter ();
|
||||||
const std::vector <std::string> getWords ();
|
const std::vector <std::string> getWords ();
|
||||||
|
const std::vector <A2> getMiscellaneous ();
|
||||||
bool canonicalize (std::string&, const std::string&, const std::string&);
|
bool canonicalize (std::string&, const std::string&, const std::string&);
|
||||||
std::string getBinary () const;
|
std::string getBinary () const;
|
||||||
std::string getCommand (bool canonical = true) const;
|
std::string getCommand (bool canonical = true) const;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue