Kotlin / kotlinx-cli

Pure Kotlin implementation of a generic CLI parser.
Apache License 2.0
914 stars 71 forks source link

Add support for vararg options #84

Closed rohdef closed 2 years ago

rohdef commented 2 years ago

Many tools make good use of the ability to pass multiple options for execution. E.g., I'd like to pass/override certain properties in my application:

./app -p foo=42 -p "bar=uh, sounds like fun" -p baz=false

For this I'd expect at least the option to do:

val parameters by parser.option(ArgType.String, "property", "p", "property to override")
        .varargs
rohdef commented 2 years ago

And shortly after I find that I overlooked multiple(), but perhaps a request for more consistent naming and perhaps in the long run better documentation ;)