l3nz / cli-matic

Compact, hands-free [sub]command line parsing library for Clojure.
Eclipse Public License 2.0
360 stars 28 forks source link

Glob multiple position arguments #149

Open l3nz opened 2 years ago

l3nz commented 2 years ago

version

0.5.2 / JVM

problem

At the moment, you cannot have both a positional argument and :multi , because only the first argument will be globbed. In theory, you should be able to glob multiple positional arguments if the positional argument is the last one and :multi is enabled.

repro

See https://github.com/l3nz/cli-matic/blob/master/examples/clj/multi_positional.clj

expected/actual behavior

If we run:

$ ./multi_positional.clj add --addendum 3 --addendum 5 8

But if we run

$ ./multi_positional.clj add 3 5

We get 3 and not 8 because the second argument is not globbed