Thread (30 messages) 30 messages, 1 author, 2020-10-29
STALE2074d
Revisions (2)
  1. v2 [diff vs current]
  2. v3 current

[PATCH v3 25/29] completion: zsh: add simple version check

From: Felipe Contreras <hidden>
Date: 2020-10-28 21:58:35
Subsystem: the rest · Maintainer: Linus Torvalds

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 <redacted>
---
 contrib/completion/git-completion.zsh | 5 +++++
 1 file changed, 5 insertions(+)
diff --git a/contrib/completion/git-completion.zsh b/contrib/completion/git-completion.zsh
index 2956b9d0d8..811d77cb95 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
-- 
2.29.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help