From 67b35db551e6e80d1cf348b169bb54eeb980b3de Mon Sep 17 00:00:00 2001 From: jan-vcapgemini Date: Tue, 7 Nov 2023 12:31:50 +0100 Subject: [PATCH] #56: added new constant added new constant for maximum results to display --- cli/src/main/java/com/devonfw/tools/ide/cli/Ide.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cli/src/main/java/com/devonfw/tools/ide/cli/Ide.java b/cli/src/main/java/com/devonfw/tools/ide/cli/Ide.java index bd09a4b65..ed4f65dda 100644 --- a/cli/src/main/java/com/devonfw/tools/ide/cli/Ide.java +++ b/cli/src/main/java/com/devonfw/tools/ide/cli/Ide.java @@ -40,6 +40,8 @@ public final class Ide { private static final String INVALID_ARGUMENT_WITH_CAUSE = INVALID_ARGUMENT + ":{}"; + private static final int AUTOCOMPLETER_MAX_RESULTS = 50; + private AbstractIdeContext context; /** @@ -172,7 +174,7 @@ private void initializeJlineCompletion() { IdeCompleter completer = new IdeCompleter(init, context); LineReader reader = LineReaderBuilder.builder().terminal(terminal).completer(completer).parser(parser) - .variable(LineReader.LIST_MAX, 50).build(); + .variable(LineReader.LIST_MAX, AUTOCOMPLETER_MAX_RESULTS).build(); // Create autosuggestion widgets AutosuggestionWidgets autosuggestionWidgets = new AutosuggestionWidgets(reader);