related to #7, if you are using a game engine for lua instead of pure lua, it's likely the proper shutdown isn't os.exit, in those cases, it might be better to let end-user handle the shutdown.
Returning nil instead of exiting on parser:parse() would be a solution.
Right, having a way to set a custom exit function would make sense. If you don't want to exit at all you can use parser:pparse(), although --help will still quit.
related to #7, if you are using a game engine for lua instead of pure lua, it's likely the proper shutdown isn't
os.exit
, in those cases, it might be better to let end-user handle the shutdown.Returning
nil
instead of exiting onparser:parse()
would be a solution.ref: https://love2d.org/wiki/love.event.quit