mirror of
https://github.com/TangentFoxy/argparse.git
synced 2026-01-11 08:28:22 +00:00
Add 'concat' action
This commit is contained in:
@@ -375,6 +375,16 @@ function actions.append(result, target, argument, overwrite)
|
||||
end
|
||||
end
|
||||
|
||||
function actions.concat(result, target, arguments, overwrite)
|
||||
if overwrite then
|
||||
error("'concat' action can't handle too many invocations")
|
||||
end
|
||||
|
||||
for _, argument in ipairs(arguments) do
|
||||
table.insert(result[target], argument)
|
||||
end
|
||||
end
|
||||
|
||||
function Argument:_get_action()
|
||||
local action, init
|
||||
|
||||
|
||||
Reference in New Issue
Block a user