Skip to content

Commit 2769e56

Browse files
felipecgitster
authored andcommitted
completion: zsh: add alias descriptions
Signed-off-by: Felipe Contreras <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 9d76052 commit 2769e56

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

contrib/completion/git-completion.zsh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,9 @@ __git_zsh_cmd_common ()
196196
__git_zsh_cmd_alias ()
197197
{
198198
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
201202
}
202203

203204
__git_zsh_cmd_all ()

0 commit comments

Comments
 (0)