mirror of
https://github.com/TangentFoxy/argparse.git
synced 2025-10-25 04:45:03 +00:00
Allows saving name of used command in a field of result target.
Helpful when command callbacks are stored in a table with names as keys
or when they are in submodules of some namespace.
Example:
local parser = argparse():command_target("command")
-- Add commands...
local args = parser:parse()
require("namespace." .. args.command).run(args)