diff --git a/src/CLI2.cpp b/src/CLI2.cpp index 6046bf0bb..52a9d2fa8 100644 --- a/src/CLI2.cpp +++ b/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 && context.config.getInteger ("debug.parser") >= 3) context.debug (dump ("CLI2::prepareFilter categorize"));