diff --git a/src/CLI2.cpp b/src/CLI2.cpp index 39410c02b..122991391 100644 --- a/src/CLI2.cpp +++ b/src/CLI2.cpp @@ -365,7 +365,7 @@ void CLI2::lexArguments () ) ) { - if (type == Lexer::Type::separator) + if (! terminated && type == Lexer::Type::separator) terminated = true; else if (terminated) type = Lexer::Type::word; @@ -530,6 +530,9 @@ void CLI2::prepareFilter (bool applyContext) for (auto& a : _args) { + if (a._lextype == Lexer::Type::separator) + continue; + if (a.hasTag ("CMD")) { foundCommand = true;