Skip to content

Commit e3901e3

Browse files
committed
[#1803] DOC: show @Command-annotated method with int return value in user manual
1 parent 5366db8 commit e3901e3

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

RELEASE-NOTES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ Picocli 4.7.0 introduced a `sortSynopsis = false` attribute to let the synopsis
125125
* [#1788] DOC: add link to `picocli-examples` in the user manual. Thanks to [Markus Elfring](https://github.com/Markus-Elfring) for raising this.
126126
* [#1796] DOC: Fixing broken links and typos. Thanks to [Andreas Deininger](https://github.com/deining) for the pull request.
127127
* [#1798] DOC: update examples for jakarta.validation-api. Thanks to [Roy](https://github.com/ashr123) for raising this.
128+
* [#1803] DOC: show `@Command`-annotated method with `int` return value in user manual. Thanks to [SinaMobasheri](https://github.com/SinaMobasheri) for raising this.
128129
* [#1581] BUILD: Fix dependabot config.
129130
* [#1613] DEP: The `picocli-groovy` module now declares `groovy-all` as dependency.
130131
* [#1604] DEP: Remove dependency on `slf4j` from `picocli-spring-boot-starter`.

docs/index.adoc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10594,12 +10594,13 @@ class Cat {
1059410594
1059510595
@Command(description = "Concatenate FILE(s) to standard output.",
1059610596
mixinStandardHelpOptions = true, version = "4.1.3")
10597-
void cat(@Option(names = {"-E", "--show-ends"}) boolean showEnds,
10597+
int cat(@Option(names = {"-E", "--show-ends"}) boolean showEnds,
1059810598
@Option(names = {"-n", "--number"}) boolean number,
1059910599
@Option(names = {"-T", "--show-tabs"}) boolean showTabs,
1060010600
@Option(names = {"-v", "--show-nonprinting"}) boolean showNonPrinting,
1060110601
@Parameters(paramLabel = "FILE") File[] files) {
1060210602
// process files
10603+
return CommandLine.ExitCode.OK;
1060310604
}
1060410605
}
1060510606
----
@@ -10614,8 +10615,9 @@ class Cat {
1061410615
@Option(names = ["-n", "--number"]) number: Boolean,
1061510616
@Option(names = ["-T", "--show-tabs"]) showTabs: Boolean,
1061610617
@Option(names = ["-v", "--show-nonprinting"]) showNonPrinting: Boolean,
10617-
@Parameters(paramLabel = "FILE") files: Array<File>?) {
10618+
@Parameters(paramLabel = "FILE") files: Array<File>?): Int {
1061810619
// process files
10620+
return CommandLine.ExitCode.OK
1061910621
}
1062010622
}
1062110623

0 commit comments

Comments
 (0)