Return-Path: X-Original-To: apmail-karaf-issues-archive@minotaur.apache.org Delivered-To: apmail-karaf-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2132D11690 for ; Tue, 17 Jun 2014 21:21:08 +0000 (UTC) Received: (qmail 88425 invoked by uid 500); 17 Jun 2014 21:21:08 -0000 Delivered-To: apmail-karaf-issues-archive@karaf.apache.org Received: (qmail 88412 invoked by uid 500); 17 Jun 2014 21:21:08 -0000 Mailing-List: contact issues-help@karaf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@karaf.apache.org Delivered-To: mailing list issues@karaf.apache.org Received: (qmail 88400 invoked by uid 99); 17 Jun 2014 21:21:07 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Jun 2014 21:21:07 +0000 Date: Tue, 17 Jun 2014 21:21:07 +0000 (UTC) From: "Rebecca Chan (JIRA)" To: issues@karaf.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (KARAF-3055) tabbing in subshell displays more than commands of the current subshell MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Rebecca Chan created KARAF-3055: ----------------------------------- Summary: tabbing in subshell displays more than commands of the current subshell Key: KARAF-3055 URL: https://issues.apache.org/jira/browse/KARAF-3055 Project: Karaf Issue Type: Bug Components: karaf-shell Affects Versions: 3.0.1 Reporter: Rebecca Chan Priority: Minor According to subshell release note, if the complete mode is set to either 'FIRST' or 'SUBSHELL' and you type the TAB key when you are in a subshell, the completion will display only the commands of the current subshell. I have two subshells, auth and auth-ldap. Each has different commands auth:show auth-ldap:update auth-ldap:delete When I am in subshell 'auth' and press tab, I expect to see only the 'show' command. However, 'show', 'delete' and 'update' are displayed in the 'auth' subshell. *CAUSE* After looking into the source code of karaf 3.0.1, there is a bug in method 'complete' in 'org.apache.karaf.shell.console.completer.CommandsCompleter'. If the key of a completer starts with the current subshell name, the completer will be added to the matching completer list. For my case, the current subshell name 'auth' partially matches the keys, "auth-ldap:update" and "auth-ldap:delete" , of completers and incorrect commands,"update" and "delete" are displayed in "auth" subshell. -- This message was sent by Atlassian JIRA (v6.2#6252)