-
Notifications
You must be signed in to change notification settings - Fork 429
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
picocli map array of strings #677
Comments
You should be able to achieve this by quoting the part that should not be split (see https://picocli.info/#_quoted_values). For example, you can pass this value on the command line:
|
I don’t think this is a hack. :-) Several command line parsers provide support for splitting comma-separated option values, but I’m not aware of any parser other than picocli that is able to preserve commas in quoted values. It would be nice if you could achieve everything without custom coding but there’s a limit to what the library can provide that is generic enough to be useful for many applications. Anyway, glad we got your use case to work. |
Sorry, I should clarify. It's more of a hack on my side. The alternative in Flank is requiring a 1:1 pairing of test apks to app apks. Allowing an arbitrary number of test apks to be associated with one app apk ended up introducing more complexity than anticipated. picocli is great and I appreciate the quick response to issues. 😄I agree that custom code makes sense here since it's a weird use case. I like that so far picocli has been able to support all the use cases as we approach parity with Google's official CLI. |
Very cool! |
Is it possible to pass a map that contains an array of strings? I'm able to parse out KEY=VALUE but that's it. I'm trying to parse the CLI flag into this data class:
The text was updated successfully, but these errors were encountered: