mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-30 20:37:20 +02:00
CLI
- Implemented ::getFilter.
This commit is contained in:
parent
d32b6fff12
commit
acca1c66a3
2 changed files with 25 additions and 0 deletions
24
src/CLI.cpp
24
src/CLI.cpp
|
@ -232,6 +232,30 @@ bool CLI::canonicalize (
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
const std::string CLI::getFilter () const
|
||||||
|
{
|
||||||
|
std::string filter = "";
|
||||||
|
|
||||||
|
if (_filter.size ())
|
||||||
|
{
|
||||||
|
filter = "(";
|
||||||
|
|
||||||
|
std::vector <std::string>::const_iterator i;
|
||||||
|
for (i = _filter.begin (); i != _filter.end (); ++i)
|
||||||
|
{
|
||||||
|
if (i != _filter.begin ())
|
||||||
|
filter += ' ';
|
||||||
|
|
||||||
|
filter += *i;
|
||||||
|
}
|
||||||
|
|
||||||
|
filter += ')';
|
||||||
|
}
|
||||||
|
|
||||||
|
return filter;
|
||||||
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
void CLI::dump (const std::string& label) const
|
void CLI::dump (const std::string& label) const
|
||||||
{
|
{
|
||||||
|
|
|
@ -42,6 +42,7 @@ public:
|
||||||
void categorize ();
|
void categorize ();
|
||||||
bool exactMatch (const std::string&, const std::string&) const;
|
bool exactMatch (const std::string&, const std::string&) const;
|
||||||
bool canonicalize (std::string&, const std::string&, const std::string&) const;
|
bool canonicalize (std::string&, const std::string&, const std::string&) const;
|
||||||
|
const std::string getFilter () const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void extractOverrides ();
|
void extractOverrides ();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue