]> git.ipfire.org Git - thirdparty/git.git/commitdiff
completion: zsh: shuffle functions around
authorFelipe Contreras <felipe.contreras@gmail.com>
Wed, 28 Oct 2020 02:07:03 +0000 (20:07 -0600)
committerJunio C Hamano <gitster@pobox.com>
Wed, 28 Oct 2020 21:30:59 +0000 (14:30 -0700)
Just to have a nice order.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/completion/git-completion.zsh

index 4834ebc8894018daff5d4a248819306075f6a2c6..60efddb4a9fdca62881e42a980ba35b217f7bc6f 100644 (file)
@@ -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 ()