Skip to content

Commit

Permalink
[remkop#1015] Update user manual: added section Variable Arity Option…
Browse files Browse the repository at this point in the history
…s and Unknown Options
  • Loading branch information
remkop authored and jerrylususu committed May 4, 2020
1 parent 99afc6e commit 90f6a56
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions RELEASE-NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ class AdvancedMixin {
* [#989] DOC: Update examples for `picocli-shell-jline3` prior to and after the [#987][#969] bugfix. Thanks to [Ralf D. Müller](https://github.com/rdmueller) for raising this.
* [#998] DOC: Update manual: quote option parameter containing pipe characters in `split` regex for FIX message example. Thanks to [Galder Zamarreño](https://github.com/galderz) and [Max Rydahl Andersen](https://github.com/maxandersen) for raising this and subsequent discussion.
* [#1012] DOC: Update user manual: add to ArgGroup limitations. Thanks to [masupilami](https://github.com/masupilami) and [patric-r](https://github.com/patric-r) for raising this and subsequent discussion.
* [#1015] DOC: Update user manual: added section Variable Arity Options and Unknown Options. Thanks to [Chris Smowton](https://github.com/smowton) for raising this.
* [#965] Dependency Upgrade: in `picocli-examples`, bump `hibernate-validator` from 6.0.2 to 6.1.2 to deal with [CVE-2019-10219](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-10219). Thanks to [https://github.com/Security3rd](Security3rd) for raising this.

## <a name="4.3.0-deprecated"></a> Deprecations
Expand Down
8 changes: 8 additions & 0 deletions docs/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -1247,6 +1247,14 @@ the `-f` argument is recognized as a separate option.


=== Variable Arity Limitations
==== Variable Arity Options and Unknown Options
As mentioned in the <<Arity,previous section>>, while processing parameters for an option with variable arity, when a known option, a subcommand, or the <<Double dash (`--`),end-of-options delimiter>> is encountered, picocli will stop adding parameters to the variable arity option.

However, the picocli parser currently does not give special treatment to <<Unknown Options,unknown options>> (values that "look like" an option) when processing parameters for an option with variable arity.
Such values are simply consumed by the option with variable arity. This may change in a future version of picocli.


==== Variable Arity Options and Positional Parameters
Be careful when defining commands that have both an option with variable arity (like `arity = "0..*"`) and a positional parameter.

[WARNING]
Expand Down

0 comments on commit 90f6a56

Please sign in to comment.