Open timotheecour opened 6 years ago
It looks like it might be difficult to do this with cligen and use the --
parameter. AFAIK, each argument to inim needs to have a corresponding argument in the dispatching function, where --
would be an illegal parameter name. It might be possible to add an "extra args" kind of parameter (like -a or --scriptArgs) that will in turn pass it to the nim compiler when compiling the INim buffer (in which the srcFile is injected on startup)
proposal
The
--
is neededit avoids unnecessary ambiguities (and makes it easy to parse visually which is an argument to inim, which is an argument to the script) eg: with
--
required:if
--
were not required:here's how other programs handle passing arguments:
(dmd's case is bad, see https://github.com/dlang/dmd/pull/7927)
[1] example for foo.nim: bugs/inim/t03_cmdline.nim: