You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "Rebecca Chan (JIRA)" <ji...@apache.org> on 2014/06/17 23:25:07 UTC
[jira] [Updated] (KARAF-3055) tabbing in subshell displays more
than commands of the current subshell
[ https://issues.apache.org/jira/browse/KARAF-3055?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rebecca Chan updated KARAF-3055:
--------------------------------
Description:
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
The complete mode is set to 'FIRST'.
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.
was:
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.
> 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
> The complete mode is set to 'FIRST'.
> 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)