Fix option combining

Interpret '-f123' as '-f 123' if '-f' option can take an argument,
even when it can be used without one as well.
This commit is contained in:
mpeterv
2015-10-31 20:01:16 +03:00
parent 4fb2991fb2
commit 6dc13c3d26

View File

@@ -1107,7 +1107,7 @@ function ParseState:parse(args)
local option = self:get_option(name) local option = self:get_option(name)
self:invoke(option, name) self:invoke(option, name)
if i ~= #arg and option.element._minargs > 0 and option.element._maxargs > 0 then if i ~= #arg and option.element._maxargs > 0 then
self:pass(arg:sub(i + 1)) self:pass(arg:sub(i + 1))
break break
end end