Support the option value is attached after the option without a space in between. e.g. -j5

This commit is contained in:
RonxBulld 2021-05-05 13:06:37 +08:00
parent c04f8a5bb9
commit 034c128562

View File

@ -2278,6 +2278,12 @@ OptionParser::parse(int argc, const char* const* argv)
{
parse_option(value, name, value->value().get_implicit_value());
}
else if (i + 1 < s.size())
{
std::string arg_value = s.substr(i + 1);
parse_option(value, name, arg_value);
break;
}
else
{
//error