karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbono...@apache.org
Subject [karaf] branch master updated: [KARAF-6143] Fix subhsell and first completion mode support
Date Mon, 03 Jun 2019 12:18:25 GMT
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é <jbonofre@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(),


Mime
View raw message