]> git.ipfire.org Git - thirdparty/git.git/commitdiff
completion: zsh: add simple version check
authorFelipe Contreras <felipe.contreras@gmail.com>
Wed, 28 Oct 2020 02:07:08 +0000 (20:07 -0600)
committerJunio C Hamano <gitster@pobox.com>
Wed, 28 Oct 2020 21:30:59 +0000 (14:30 -0700)
A lot of people are confused about which completion script they are
using; Zsh's Git script, or Git's Zsh script.

Add a simple helper so they can type 'git zsh<tab>' and find out if they
are running the correct one: this.

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

index 2956b9d0d83bd6079e8c2f5da9eae2eb58a6983f..811d77cb953638050c829ab43c7fd608e5103196 100644 (file)
@@ -134,6 +134,11 @@ __gitcomp_file_direct ()
        __gitcomp_file "$1" ""
 }
 
+_git_zsh ()
+{
+       __gitcomp "v1.1"
+}
+
 __git_complete_command ()
 {
        emulate -L zsh