Skip to content

Commit

Permalink
Don't show hidden commands in JLine3 command description
Browse files Browse the repository at this point in the history
  • Loading branch information
Reinhard Handler authored and remkop committed Apr 15, 2024
1 parent a6053da commit 08822f0
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,9 @@ public CmdDesc commandDescription(List<String> args) {
// using JLine help highlight because the statement below does not work well...
// main.add(new AttributedString(spec.usageMessage().sectionMap().get("synopsis").render(cmdhelp).toString()));
for (OptionSpec o : spec.options()) {
if (o.hidden()) {
continue;
}
String key = Arrays.stream(o.names()).collect(Collectors.joining(" "));
List<AttributedString> val = new ArrayList<>();
for (String d: o.description()) {
Expand Down

0 comments on commit 08822f0

Please sign in to comment.