mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
CLI2: Removed old implementation from ::prepareFilter
This commit is contained in:
parent
4c55e7ef3d
commit
275548d6ed
1 changed files with 0 additions and 70 deletions
70
src/CLI2.cpp
70
src/CLI2.cpp
|
@ -628,76 +628,6 @@ void CLI2::prepareFilter (bool applyContext)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
for (auto& a : _args)
|
|
||||||
{
|
|
||||||
std::string raw = a.attribute ("raw");
|
|
||||||
|
|
||||||
if (! terminated && raw == "--")
|
|
||||||
{
|
|
||||||
a.tag ("ORIGINAL");
|
|
||||||
a.tag ("TERMINATOR");
|
|
||||||
terminated = true;
|
|
||||||
changes = true;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
else if (terminated)
|
|
||||||
{
|
|
||||||
a.tag ("ORIGINAL");
|
|
||||||
a.tag ("TERMINATED");
|
|
||||||
a.tag ("WORD");
|
|
||||||
changes = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (raw.find (' ') != std::string::npos)
|
|
||||||
{
|
|
||||||
a.tag ("QUOTED");
|
|
||||||
changes = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string canonical;
|
|
||||||
if (! terminated &&
|
|
||||||
! foundCommand &&
|
|
||||||
canonicalize (canonical, "cmd", raw))
|
|
||||||
{
|
|
||||||
readOnly = ! exactMatch ("writecmd", canonical);
|
|
||||||
|
|
||||||
a.tag ("CMD");
|
|
||||||
a.tag (readOnly ? "READCMD" : "WRITECMD");
|
|
||||||
a.attribute ("canonical", canonical);
|
|
||||||
foundCommand = true;
|
|
||||||
changes = true;
|
|
||||||
}
|
|
||||||
else if (a.hasTag ("TERMINATOR") ||
|
|
||||||
a.hasTag ("BINARY") ||
|
|
||||||
a.hasTag ("CONFIG") ||
|
|
||||||
a.hasTag ("RC"))
|
|
||||||
{
|
|
||||||
// NOP
|
|
||||||
}
|
|
||||||
else if (foundCommand && ! readOnly)
|
|
||||||
{
|
|
||||||
a.tag ("MODIFICATION");
|
|
||||||
|
|
||||||
// If the argument contains a space, it was quoted. Record that.
|
|
||||||
if (! Lexer::isOneWord (raw))
|
|
||||||
a.tag ("QUOTED");
|
|
||||||
|
|
||||||
changes = true;
|
|
||||||
}
|
|
||||||
else if (!foundCommand || (foundCommand && readOnly))
|
|
||||||
{
|
|
||||||
a.tag ("FILTER");
|
|
||||||
|
|
||||||
// If the argument contains a space, it was quoted. Record that.
|
|
||||||
if (! Lexer::isOneWord (raw))
|
|
||||||
a.tag ("QUOTED");
|
|
||||||
|
|
||||||
changes = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (changes &&
|
if (changes &&
|
||||||
context.config.getInteger ("debug.parser") >= 3)
|
context.config.getInteger ("debug.parser") >= 3)
|
||||||
context.debug (dump ("CLI2::prepareFilter categorize"));
|
context.debug (dump ("CLI2::prepareFilter categorize"));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue