completion: zsh: add alias descriptions
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Felipe Contreras committed
Oct 27, 2020 at 20:07 UTC
2769e567d140a51e4e6e426fe776005ae889e9b0
1 file changed
+3
-2
contrib/completion/git-completion.zsh
+3
-2
@@ -196,8 +196,9 @@ __git_zsh_cmd_common ()
196
__git_zsh_cmd_alias ()
197
{
198
local -a list
199
- list=(${${${(0)"$(git config -z --get-regexp '^alias\.')"}#alias.}%$'\n'*})
200
- _describe -t alias-commands 'aliases' list $* && _ret=0
199
+ list=(${${(0)"$(git config -z --get-regexp '^alias\.*')"}#alias.})
200
+ list=(${(f)"$(printf "%s:alias for '%s'\n" ${(f@)list})"})
201
+ _describe -t alias-commands 'aliases' list && _ret=0
202
}
203
204
__git_zsh_cmd_all ()