You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by gn...@apache.org on 2017/10/02 09:32:14 UTC

karaf git commit: [KARAF-5398] The "cd" command should not attempt to complete multiple directories

Repository: karaf
Updated Branches:
  refs/heads/master 3adf596fd -> 3333f2bcb


[KARAF-5398] The "cd" command should not attempt to complete multiple directories


Project: http://git-wip-us.apache.org/repos/asf/karaf/repo
Commit: http://git-wip-us.apache.org/repos/asf/karaf/commit/3333f2bc
Tree: http://git-wip-us.apache.org/repos/asf/karaf/tree/3333f2bc
Diff: http://git-wip-us.apache.org/repos/asf/karaf/diff/3333f2bc

Branch: refs/heads/master
Commit: 3333f2bcb30760d18e7434a95dc9c443440cf836
Parents: 3adf596
Author: Guillaume Nodet <gn...@gmail.com>
Authored: Mon Oct 2 11:32:01 2017 +0200
Committer: Guillaume Nodet <gn...@gmail.com>
Committed: Mon Oct 2 11:32:01 2017 +0200

----------------------------------------------------------------------
 .../main/resources/resources/etc/scripts/shell.completion.script   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/karaf/blob/3333f2bc/assemblies/features/base/src/main/resources/resources/etc/scripts/shell.completion.script
----------------------------------------------------------------------
diff --git a/assemblies/features/base/src/main/resources/resources/etc/scripts/shell.completion.script b/assemblies/features/base/src/main/resources/resources/etc/scripts/shell.completion.script
index 17b165f..a220c73 100644
--- a/assemblies/features/base/src/main/resources/resources/etc/scripts/shell.completion.script
+++ b/assemblies/features/base/src/main/resources/resources/etc/scripts/shell.completion.script
@@ -93,7 +93,7 @@ if { %(jlineReader != null) } {
 
   complete -c shell:cd -e
   complete -c shell:cd -d "Change current directory"
-  complete -c shell:cd -a '__directories'
+  complete -c shell:cd -a 'wi = ($.commandLine wordIndex); if { %(wi==1) } { __directories } { [ ] }'
 
   complete -c shell:sleep -e
   complete -c shell:sleep -d "Pause execution for the specified amount of time"