Comonicon.jl icon indicating copy to clipboard operation
Comonicon.jl copied to clipboard

Support Vector arguments by combining multiple identical options into a single Vector

Open schlichtanders opened this issue 11 months ago • 1 comments

Hi there, it would be nice if there is a possibility to support Vector arguments out of the box. Like

@main function main(a; b::Vector{Int})
    # ...
end

and call it with myscript "a" --b 1 --b 2 --b 5 so that b=Int[1,2,5]

EDIT: ArgParse.jl apparently has support for it. See https://carlobaldassi.github.io/ArgParse.jl/latest/arg_table.html#Available-actions-and-nargs-values-1

schlichtanders avatar Jan 17 '25 18:01 schlichtanders

thanks yeah this could be a nice addition. I won't have time working on this anymore however (my bandwidth is more limited due to my limbo situation caused by the stupid US visa scam). I'm happy to review a PR if anyone want to work on it. Otherwise I may have more time after I settle down somewhere.

Roger-luo avatar Jan 24 '25 21:01 Roger-luo