about summary refs log tree commit diff
path: root/Completion/Unix/Command/_git
diff options
context:
space:
mode:
authorm0viefreak <m0viefreak.cm@googlemail.com>2014-02-17 05:00:38 +0100
committerFrank Terbeck <ft@bewatermyfriend.org>2014-02-18 12:22:21 +0100
commitf8e874ef9d2d44f571517d90b2cd2181f4380778 (patch)
treef37871b83c31b779f6e98f65f111df4544a6a324 /Completion/Unix/Command/_git
parent139ee0e351d8b79f25319054714ec669d13ae87e (diff)
downloadzsh-f8e874ef9d2d44f571517d90b2cd2181f4380778.tar.gz
zsh-f8e874ef9d2d44f571517d90b2cd2181f4380778.tar.xz
zsh-f8e874ef9d2d44f571517d90b2cd2181f4380778.zip
32397: _git: fix __git_submodules to only use the actual name of the submodule
The output of 'submodule status' is

Xsha1 name (describe)

X being one of -,+,U,[space]

We are only interested in the name part and not the whole line.

Fix the parameter expansions accordingly.
Diffstat (limited to 'Completion/Unix/Command/_git')
-rw-r--r--Completion/Unix/Command/_git2
1 files changed, 1 insertions, 1 deletions
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