Skip to content

Commit

Permalink
Simplify CMD line syntax (idaholab#17989)
Browse files Browse the repository at this point in the history
  • Loading branch information
dschwen committed Jun 8, 2021
1 parent 2b9918e commit 9e9714a
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions framework/include/parser/CommandLine.h
Expand Up @@ -214,15 +214,18 @@ CommandLine::search(const std::string & option_name, std::vector<T> & 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;
}
}
}
}
Expand Down

0 comments on commit 9e9714a

Please sign in to comment.