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:25 UTC
[karaf] branch master 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 master
in repository https://gitbox.apache.org/repos/asf/karaf.git
The following commit(s) were added to refs/heads/master by this push:
new 21727c3 [KARAF-6143] Fix subhsell and first completion mode support
new 0e06c5d Merge pull request #856 from jbonofre/KARAF-6143
21727c3 is described below
commit 21727c3379c6654569e4708ba76d8e049438d950
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(),