diff mbox series

[v2,25/29] completion: zsh: add simple version check

Message ID 20201025031343.346913-26-felipe.contreras@gmail.com (mailing list archive)
State New, archived
Headers show
Series None | expand

Commit Message

Felipe Contreras Oct. 25, 2020, 3:13 a.m. UTC
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>
---
 contrib/completion/git-completion.zsh | 5 +++++
 1 file changed, 5 insertions(+)
diff mbox series

Patch

diff --git a/contrib/completion/git-completion.zsh b/contrib/completion/git-completion.zsh
index 1b2a43150d..9fc9f2db21 100644
--- a/contrib/completion/git-completion.zsh
+++ b/contrib/completion/git-completion.zsh
@@ -127,6 +127,11 @@  __gitcomp_file_direct ()
 	__gitcomp_file "$1" ""
 }
 
+_git_zsh ()
+{
+	__gitcomp "v1.0"
+}
+
 __git_complete_command ()
 {
 	emulate -L zsh