mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
CLI2: Added ::addFilter method
This commit is contained in:
parent
c8fd51bd27
commit
82c5d019a3
2 changed files with 10 additions and 4 deletions
12
src/CLI2.cpp
12
src/CLI2.cpp
|
@ -455,11 +455,15 @@ void CLI2::addContextFilter ()
|
|||
context.footnote (format ("Context '{1}' set. Use 'task context none' to remove.", contextName));
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Process raw string into parsed filter.
|
||||
void CLI2::addRawFilter (const std::string& arg)
|
||||
// Process raw string.
|
||||
void CLI2::addFilter (const std::string& arg)
|
||||
{
|
||||
if (arg.length ())
|
||||
add ("(");
|
||||
|
||||
std::string lexeme;
|
||||
Lexer::Type type;
|
||||
Lexer lex (arg);
|
||||
|
@ -467,8 +471,10 @@ void CLI2::addRawFilter (const std::string& arg)
|
|||
|
||||
while (lex.token (lexeme, type))
|
||||
add (lexeme);
|
||||
|
||||
if (arg.length ())
|
||||
add (")");
|
||||
}
|
||||
*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Parset the commnad line, identifiying filter components, expanding syntactic
|
||||
|
|
|
@ -75,8 +75,8 @@ public:
|
|||
void analyze ();
|
||||
/*
|
||||
void addContextFilter ();
|
||||
void addRawFilter (const std::string& arg);
|
||||
*/
|
||||
void addFilter (const std::string& arg);
|
||||
void prepareFilter (bool applyContext = true);
|
||||
const std::vector <std::string> getWords (bool filtered = true);
|
||||
bool canonicalize (std::string&, const std::string&, const std::string&) const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue