diff --git a/framework/include/parser/CommandLine.h b/framework/include/parser/CommandLine.h index 20fedf8eec51..532d2fa6b344 100644 --- a/framework/include/parser/CommandLine.h +++ b/framework/include/parser/CommandLine.h @@ -214,15 +214,18 @@ CommandLine::search(const std::string & option_name, std::vector & argument) // we append a true value to the vector. if (pos->second.argument_type == NONE) argument.push_back(T()); - else if (j + 1 < _args.size()) - { - std::stringstream ss; - ss << _args[j + 1]; - - T item; - setArgument(ss, item); - argument.push_back(item); - } + else + while (j + 1 < _args.size() && _args[j + 1][0] != '-' && + _args[j + 1].find("=") == std::string::npos) + { + std::stringstream ss; + ss << _args[j + 1]; + + T item; + setArgument(ss, item); + argument.push_back(item); + ++j; + } } } }