From f8e874ef9d2d44f571517d90b2cd2181f4380778 Mon Sep 17 00:00:00 2001 From: m0viefreak Date: Mon, 17 Feb 2014 05:00:38 +0100 Subject: 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. --- Completion/Unix/Command/_git | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Completion/Unix/Command') 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 -- cgit 1.4.1