completion: zsh: add simple version check
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>
Felipe Contreras committed
Oct 27, 2020 at 20:07 UTC
35a4170d8656b27d08458c3c381dd163199da4f3
1 file changed
+5
contrib/completion/git-completion.zsh
+5
@@ -134,6 +134,11 @@ __gitcomp_file_direct ()
134
__gitcomp_file "$1" ""
135
}
136
137
+_git_zsh ()
138
+{
139
+ __gitcomp "v1.1"
140
+}
141
+
142
__git_complete_command ()
143
{
144
emulate -L zsh