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. --- ChangeLog | 3 +++ Completion/Unix/Command/_git | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) 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 * 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 -- cgit 1.4.1