From 184fde0f5fbe1595df00c5d9b84cf7c9757a69a5 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sat, 4 Jul 2015 16:39:15 -0400 Subject: [PATCH] CLI2: Skips first terminator, --, but not others --- src/CLI2.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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;