about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--Completion/Unix/Command/_git2
2 files changed, 4 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 780eb5944..76c2d8a21 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,9 @@
 	* 32395: Completion/Unix/Command/_git: _git: diff: refactor and
 	fix wrong completions
 
+	* 32397: Completion/Unix/Command/_git: _git: fix __git_submodules
+	to only use the actual name of the submodule
+
 2014-02-17  Barton E. Schaefer  <schaefer@zsh.org>
 
 	* unposted (users/18468): Doc/Zsh/builtins.yo, Doc/Zsh/params.yo:
diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index e9905cce6..a8a8786e1 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -5548,7 +5548,7 @@ __git_submodules () {
   local expl
   declare -a submodules
 
-  submodules=(${${(f)"$(_call_program submodules git submodule 2>/dev/null)"}#* })
+  submodules=(${${${(f)"$(_call_program submodules git submodule 2>/dev/null)"}#?* }%% *})
   __git_command_successful $pipestatus || return 1
 
   _wanted submodules expl submodule compadd $* - $submodules