From 46af9b371929c3c3c9cc0f5b4aa9bcb3089e6405 Mon Sep 17 00:00:00 2001 From: Felipe Contreras Date: Tue, 27 Oct 2020 20:07:03 -0600 Subject: [PATCH] completion: zsh: shuffle functions around Just to have a nice order. Signed-off-by: Felipe Contreras Signed-off-by: Junio C Hamano --- contrib/completion/git-completion.zsh | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/contrib/completion/git-completion.zsh b/contrib/completion/git-completion.zsh index 4834ebc889..60efddb4a9 100644 --- a/contrib/completion/git-completion.zsh +++ b/contrib/completion/git-completion.zsh @@ -104,11 +104,6 @@ __gitcomp_direct () compadd -Q -S '' -- ${(f)1} && _ret=0 } -__gitcomp_direct_append () -{ - __gitcomp_direct "$@" -} - __gitcomp_nl () { emulate -L zsh @@ -117,6 +112,18 @@ __gitcomp_nl () compadd -Q -S "${4- }" -p "${2-}" -- ${(f)1} && _ret=0 } +__gitcomp_file () +{ + emulate -L zsh + + compadd -f -p "${2-}" -- ${(f)1} && _ret=0 +} + +__gitcomp_direct_append () +{ + __gitcomp_direct "$@" +} + __gitcomp_nl_append () { __gitcomp_nl "$@" @@ -124,14 +131,7 @@ __gitcomp_nl_append () __gitcomp_file_direct () { - __gitcomp_file "$1" '' -} - -__gitcomp_file () -{ - emulate -L zsh - - compadd -f -p "${2-}" -- ${(f)1} && _ret=0 + __gitcomp_file "$1" "" } __git_zsh_bash_func ()