completion: zsh: simplify file_direct
authorFelipe Contreras <redacted>
Wed, 28 Oct 2020 02:07:02 +0000 (20:07 -0600)
committerJunio C Hamano <redacted>
Wed, 28 Oct 2020 21:30:59 +0000 (14:30 -0700)
It's exactly the same as __gitcomp_file() with no prefix.

Signed-off-by: Felipe Contreras <redacted>
Signed-off-by: Junio C Hamano <redacted>
contrib/completion/git-completion.zsh

index 7126c7500125a507ad47c67956dcc985dafd11d0..4834ebc8894018daff5d4a248819306075f6a2c6 100644 (file)
@@ -124,9 +124,7 @@ __gitcomp_nl_append ()
 
 __gitcomp_file_direct ()
 {
-       emulate -L zsh
-
-       compadd -f -- ${(f)1} && _ret=0
+       __gitcomp_file "$1" ''
 }
 
 __gitcomp_file ()
git clone https://git.99rst.org/PROJECT