summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelipe Contreras <felipe.contreras@gmail.com>2020-10-28 02:07:08 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-10-28 21:30:59 (GMT)
commit35a4170d8656b27d08458c3c381dd163199da4f3 (patch)
tree24064ab2e0abda8419037dcb1944bdcf6ec45244
parentbbd7f45884ca379e3cd28bb5fb8e804bcfb3360c (diff)
downloadgit-35a4170d8656b27d08458c3c381dd163199da4f3.zip
git-35a4170d8656b27d08458c3c381dd163199da4f3.tar.gz
git-35a4170d8656b27d08458c3c381dd163199da4f3.tar.bz2
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>
-rw-r--r--contrib/completion/git-completion.zsh5
1 files changed, 5 insertions, 0 deletions
diff --git a/contrib/completion/git-completion.zsh b/contrib/completion/git-completion.zsh
index 2956b9d..811d77c 100644
--- a/contrib/completion/git-completion.zsh
+++ b/contrib/completion/git-completion.zsh
@@ -134,6 +134,11 @@ __gitcomp_file_direct ()
__gitcomp_file "$1" ""
}
+_git_zsh ()
+{
+ __gitcomp "v1.1"
+}
+
__git_complete_command ()
{
emulate -L zsh