From fe4e8fab25ba3798c5a32b14ab5d1844f282a016 Mon Sep 17 00:00:00 2001 From: Remko Popma Date: Tue, 8 Mar 2022 05:57:07 +0900 Subject: [PATCH] [#1629] Omit empty braces in prompt for interactive options without description Closes #1629 --- RELEASE-NOTES.md | 1 + src/main/java/picocli/CommandLine.java | 4 ++- src/test/java/picocli/InteractiveArgTest.java | 25 +++++++++++++++++++ 3 files changed, 29 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index 35b06f761..8e8219a65 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -94,6 +94,7 @@ Picocli 4.7.0 introduced a `sortSynopsis = false` attribute to let the synopsis * [#1572] Enhancement: Remove redundant braces in ArgGroup synopsis. * [#1602] Enhancement: Fix incorrect debug output for add/removeAlias. * [#1603] Enhancement: Improve debug tracing information for help requests and command execution. +* [#1629] Enhancement: Omit empty braces in standard prompt for interactive options without description. Thanks to [Andreas Deininger](https://github.com/deining) for raising this. * [#1615][#1616] Bugfix: `getCJKAdjustedLength()` no longer miscalculates for supplementary code points. Thanks to [gwalbran](https://github.com/gwalbran) for the pull request. * [#1575] Bugfix: Synopsis should not cluster boolean options if `posixClusteredShortOptionsAllowed` is set to false. * [#1298] DOC: Publish all-in-one javadoc for all picocli modules. diff --git a/src/main/java/picocli/CommandLine.java b/src/main/java/picocli/CommandLine.java index 72de3827c..4a15eb840 100644 --- a/src/main/java/picocli/CommandLine.java +++ b/src/main/java/picocli/CommandLine.java @@ -14742,7 +14742,9 @@ private boolean assertNoMissingParameters(ArgSpec argSpec, Range arity, Stack