From a4a1f81e95affd0f8bb1951afa382a7434a601b2 Mon Sep 17 00:00:00 2001 From: Thomas Zander Date: Sun, 13 Apr 2008 17:45:43 +0200 Subject: [PATCH] Make commandline parser work with values to options in same argument --- CommandLineParser.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CommandLineParser.cpp b/CommandLineParser.cpp index b5883de..24ee3ee 100644 --- a/CommandLineParser.cpp +++ b/CommandLineParser.cpp @@ -219,6 +219,11 @@ void CommandLineParser::Private::parse() processor.next(option); currentDefinition = definition; option.option = definition.name; + + if (definition.requiredParameters == 1 && arg.length() >= x+2) { + option.parameters << arg.mid(x+1, arg.length()); + x = arg.length(); + } break; } } -- 2.11.4.GIT