You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by jb...@apache.org on 2019/06/03 12:18:57 UTC
[karaf] branch karaf-4.2.x updated: [KARAF-6143] Fix subhsell and
first completion mode support
This is an automated email from the ASF dual-hosted git repository.
jbonofre pushed a commit to branch karaf-4.2.x
in repository https://gitbox.apache.org/repos/asf/karaf.git
The following commit(s) were added to refs/heads/karaf-4.2.x by this push:
new d83e6fb [KARAF-6143] Fix subhsell and first completion mode support
d83e6fb is described below
commit d83e6fbba1521386a242b8fbeb5ab37a927d71eb
Author: Jean-Baptiste Onofré <jb...@apache.org>
AuthorDate: Mon Jun 3 10:30:22 2019 +0200
[KARAF-6143] Fix subhsell and first completion mode support
---
.../java/org/apache/karaf/shell/impl/console/CommandsCompleter.java | 2 ++
1 file changed, 2 insertions(+)
diff --git a/shell/core/src/main/java/org/apache/karaf/shell/impl/console/CommandsCompleter.java b/shell/core/src/main/java/org/apache/karaf/shell/impl/console/CommandsCompleter.java
index 165ed2b..06dbd0d 100644
--- a/shell/core/src/main/java/org/apache/karaf/shell/impl/console/CommandsCompleter.java
+++ b/shell/core/src/main/java/org/apache/karaf/shell/impl/console/CommandsCompleter.java
@@ -70,6 +70,8 @@ public class CommandsCompleter extends org.apache.karaf.shell.support.completers
CommandLine commandLine = new CommandLineImpl(line);
List<Candidate> cands = new ArrayList<>();
completeCandidates(session, commandLine, cands);
+ // cleanup candidates to avoid to pollute depending of completion mode
+ candidates.clear();
for (Candidate cand : cands) {
candidates.add(new org.jline.reader.Candidate(
cand.value(), cand.displ(), cand.group(),