]> git.ipfire.org Git - thirdparty/git.git/commitdiff
completion: zsh: simplify direct compadd
authorFelipe Contreras <felipe.contreras@gmail.com>
Wed, 28 Oct 2020 02:06:59 +0000 (20:06 -0600)
committerJunio C Hamano <gitster@pobox.com>
Wed, 28 Oct 2020 21:30:59 +0000 (14:30 -0700)
Instead of manually removing the suffix so zsh can add its own, we can
tell zsh to add no suffix, so we don't have to remove it.

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

index 1ef02f936c73d52816670510bb83b4370e25052e..3689bcbd6c5767b6aa1a342fb874247f0681a7df 100644 (file)
@@ -101,7 +101,7 @@ __gitcomp_direct ()
        emulate -L zsh
 
        compset -P '*[=:]'
-       compadd -Q -- ${${(f)1}% } && _ret=0
+       compadd -Q -S '' -- ${(f)1} && _ret=0
 }
 
 __gitcomp_direct_append ()