clink
clink copied to clipboard
Reuse one parser in another parser
I'm trying to write a parser for ddev and one of the commands is actually some kind of proxy to run Composer commands within ddev.
composer.lua
local parser = clink.arg.new_parser
local composer_parser = parser(
{
"about",
-- ...
},
-- ...
)
clink.arg.register_parser("composer", composer_parser)
ddev.lua
local parser = clink.arg.new_parser
local ddev_parser = parser(
{
-- ...
"composer" .. composer_parser,
-- ...
},
-- ...
)
clink.arg.register_parser("ddev", ddev_parser)
Is it possible to write a Composer parser which is reusable within ddev composer
?