CLI2: Skips first terminator, --, but not others

This commit is contained in:
Paul Beckingham 2015-07-04 16:39:15 -04:00
parent 42073656c7
commit 184fde0f5f

View file

@ -365,7 +365,7 @@ void CLI2::lexArguments ()
) )
) )
{ {
if (type == Lexer::Type::separator) if (! terminated && type == Lexer::Type::separator)
terminated = true; terminated = true;
else if (terminated) else if (terminated)
type = Lexer::Type::word; type = Lexer::Type::word;
@ -530,6 +530,9 @@ void CLI2::prepareFilter (bool applyContext)
for (auto& a : _args) for (auto& a : _args)
{ {
if (a._lextype == Lexer::Type::separator)
continue;
if (a.hasTag ("CMD")) if (a.hasTag ("CMD"))
{ {
foundCommand = true; foundCommand = true;