summaryrefslogtreecommitdiff
path: root/contrib/completion
diff options
context:
space:
mode:
authorFelipe Contreras <felipe.contreras@gmail.com>2020-10-28 02:07:03 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-10-28 21:30:59 (GMT)
commit46af9b371929c3c3c9cc0f5b4aa9bcb3089e6405 (patch)
tree2ded720d416e6cc2783d2beb455a6dc496bd38e0 /contrib/completion
parent5d64fb20511270ffb2d939210a5afe66419f69ab (diff)
downloadgit-46af9b371929c3c3c9cc0f5b4aa9bcb3089e6405.zip
git-46af9b371929c3c3c9cc0f5b4aa9bcb3089e6405.tar.gz
git-46af9b371929c3c3c9cc0f5b4aa9bcb3089e6405.tar.bz2
completion: zsh: shuffle functions around
Just to have a nice order. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/completion')
-rw-r--r--contrib/completion/git-completion.zsh24
1 files changed, 12 insertions, 12 deletions
diff --git a/contrib/completion/git-completion.zsh b/contrib/completion/git-completion.zsh
index 4834ebc..60efddb 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,21 +112,26 @@ __gitcomp_nl ()
compadd -Q -S "${4- }" -p "${2-}" -- ${(f)1} && _ret=0
}
-__gitcomp_nl_append ()
+__gitcomp_file ()
{
- __gitcomp_nl "$@"
+ emulate -L zsh
+
+ compadd -f -p "${2-}" -- ${(f)1} && _ret=0
}
-__gitcomp_file_direct ()
+__gitcomp_direct_append ()
{
- __gitcomp_file "$1" ''
+ __gitcomp_direct "$@"
}
-__gitcomp_file ()
+__gitcomp_nl_append ()
{
- emulate -L zsh
+ __gitcomp_nl "$@"
+}
- compadd -f -p "${2-}" -- ${(f)1} && _ret=0
+__gitcomp_file_direct ()
+{
+ __gitcomp_file "$1" ""
}
__git_zsh_bash_func ()