Support -- as an option

This commit is contained in:
Peter Melnichenko
2018-04-07 23:21:06 +03:00
parent bf23b082b9
commit e33a6ed563
2 changed files with 17 additions and 1 deletions

View File

@@ -1169,7 +1169,13 @@ function ParseState:parse(args)
if arg:sub(2, 2) == first then
if #arg == 2 then
self:close()
if self.options[arg] then
local option = self:get_option(arg)
self:invoke(option, arg)
else
self:close()
end
self.handle_options = false
else
local equals = arg:find "="