diff --git a/src/CLI2.cpp b/src/CLI2.cpp index 646b1a73d..572177801 100644 --- a/src/CLI2.cpp +++ b/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 diff --git a/src/CLI2.h b/src/CLI2.h index 901ae0cd0..3948ec5ea 100644 --- a/src/CLI2.h +++ b/src/CLI2.h @@ -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 getWords (bool filtered = true); bool canonicalize (std::string&, const std::string&, const std::string&) const;