summaryrefslogtreecommitdiff
path: root/contrib/completion
diff options
context:
space:
mode:
authorFelipe Contreras <felipe.contreras@gmail.com>2020-10-25 03:13:16 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-10-26 22:23:26 (GMT)
commit5eb25bcf0f89a40627b8c23af408af1892705372 (patch)
treec0dc118750f3484c20597e24c70922ab42044420 /contrib/completion
parent4ce2b5167bb63e7001e43ec5386528fb77c088fa (diff)
downloadgit-5eb25bcf0f89a40627b8c23af408af1892705372.zip
git-5eb25bcf0f89a40627b8c23af408af1892705372.tar.gz
git-5eb25bcf0f89a40627b8c23af408af1892705372.tar.bz2
completion: zsh: fix name due to broken autoloading
Commit 176f5adfdb wrongly changed the installation path to '~/.zsh/git-completion.zsh', this ensures the script is not automatically loaded. The whole point of adding the script to the fpath variable is that it's autoloaded after typing 'git<tab>', which won't happen unless it's named _git. I've changed the wording so it's crystal clear the name of the file *must* be '_git'. http://zsh.sourceforge.net/Doc/Release/Completion-System.html#Autoloaded-files Cc: Maxim Belsky <public.belsky@gmail.com> Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/completion')
-rw-r--r--contrib/completion/git-completion.zsh8
1 files changed, 5 insertions, 3 deletions
diff --git a/contrib/completion/git-completion.zsh b/contrib/completion/git-completion.zsh
index 2cefae9..6d45135 100644
--- a/contrib/completion/git-completion.zsh
+++ b/contrib/completion/git-completion.zsh
@@ -11,9 +11,11 @@
#
# zstyle ':completion:*:*:git:*' script ~/.git-completion.zsh
#
-# The recommended way to install this script is to make a copy of it in
-# ~/.zsh/ directory as ~/.zsh/git-completion.zsh and then add the following
-# to your ~/.zshrc file:
+# The recommended way to install this script is to make a copy of it as a
+# file named '_git' inside any directory in your fpath.
+#
+# For example, create a directory '~/.zsh/', copy this file to '~/.zsh/_git',
+# and then add the following to your ~/.zshrc file:
#
# fpath=(~/.zsh $fpath)