mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-01-19 11:31:26 +01:00
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.
This commit is contained in:
parent
139ee0e351
commit
f8e874ef9d
2 changed files with 4 additions and 1 deletions
|
@ -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:
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue