If I understand you correctly you have an ambiguity between the last arguments being parsed as part of the list required by the list option and the list required by the unparsed option.
You can disambiguate by putting -- between the two lists e.g.
--myList 2 3 4 5 -- file1 file2 file3
Does this help?
Makes sense. I think the -- end of options marker is quite standard, many command line argument libraries use this to disambiguate. In particular getopt, which is ubiquitous on unix systems, works this way. However I think having a configurable list separator would also be quite neat.
It would be very helpful for me if you could create a feature request on github for this issue. https://github.com/lexicalscope/jewelcli/issues
I think its a reasonably big change. At the moment the parser is independent of the option specification, so the arguments are always parsed the same way. Then after that the validator checks that the arguments meet the specification, and then the argument presenter turns the parsed arguments into an instance of the specified interface (or sets them on the object).
So there is no control over the parser from the option specification. I think it will mean parameterizing the ArgumentParserImpl to allow the list separator to be configured, then changing the AbstractCliImpl to get the list separator from the specification and pass it to the parser. If you want per-option list separators then either the parser would have to be made aware of which option it is currently parsing, or some secondary parsing phase for list options could be introduced.