mirror of
https://github.com/TangentFoxy/argparse.git
synced 2025-07-28 02:52:20 +00:00
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:
@@ -1107,7 +1107,7 @@ function ParseState:parse(args)
|
||||
local option = self:get_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))
|
||||
break
|
||||
end
|
||||
|
Reference in New Issue
Block a user