git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Felipe Contreras <felipe.contreras@gmail.com>
To: git@vger.kernel.org
Cc: "Junio C Hamano" <gitster@pobox.com>,
	"SZEDER Gábor" <szeder.dev@gmail.com>,
	"Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>,
	"Felipe Contreras" <felipe.contreras@gmail.com>
Subject: [PATCH 07/14] completion: zsh: update installation instructions
Date: Fri, 21 Jun 2019 17:31:00 -0500	[thread overview]
Message-ID: <20190621223107.8022-8-felipe.contreras@gmail.com> (raw)
In-Reply-To: <20190621223107.8022-1-felipe.contreras@gmail.com>

Commit 0e5ed7cca3 wrongly changed the extension of the bash script
to .zsh. The extension doesn't really matter, but it confuses people.

I've changed the text to make it clear that your zsh script goes to
~/.zsh/_git, and the bash script to ~/.contrib/completion/git-completion.bash (or wherever
you want).

Also, update the default locations of the system bash-completion,
including the default bash-completion location for user scripts, and the
recommended way to find the system location (with pkg-config)

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
 contrib/completion/git-completion.zsh | 23 +++++++++++++----------
 1 file changed, 13 insertions(+), 10 deletions(-)

diff --git a/contrib/completion/git-completion.zsh b/contrib/completion/git-completion.zsh
index 2801f2f7c8..7f614d5854 100644
--- a/contrib/completion/git-completion.zsh
+++ b/contrib/completion/git-completion.zsh
@@ -4,17 +4,19 @@
 #
 # Copyright (c) 2012-2013 Felipe Contreras <felipe.contreras@gmail.com>
 #
-# You need git's bash completion script installed somewhere, by default it
-# would be the location bash-completion uses.
-#
-# If your script is somewhere else, you can configure it on your ~/.zshrc:
-#
-#  zstyle ':completion:*:*:git:*' script ~/.git-completion.zsh
-#
 # The recommended way to install this script is to copy to '~/.zsh/_git', and
 # then add the following to your ~/.zshrc file:
 #
 #  fpath=(~/.zsh $fpath)
+#
+# You need git's bash completion script installed. By default it will use
+# bash-completion's script.
+#
+# If your bash completion script is somewhere else, you can configure it on
+# your ~/.zshrc:
+#
+#  zstyle ':completion:*:*:git:*' script ~/.git-completion.bash
+#
 
 zstyle -T ':completion:*:*:git:*' tag-order && \
 	zstyle ':completion:*:*:git:*' tag-order 'common-commands'
@@ -25,9 +27,10 @@ if [ -z "$script" ]; then
 	local e
 	locations=(
 		"$(dirname ${funcsourcetrace[1]%:*})"/git-completion.bash
-		'/etc/bash_completion.d/git' # fedora, old debian
-		'/usr/share/bash-completion/completions/git' # arch, ubuntu, new debian
-		'/usr/share/bash-completion/git' # gentoo
+		"$HOME/.local/share/bash-completion/completions/git"
+		"$(pkg-config --variable=completionsdir bash-completion)"/git
+		'/usr/share/bash-completion/completions/git'
+		'/etc/bash_completion.d/git' # old debian
 		)
 	for e in $locations; do
 		test -f $e && script="$e" && break
-- 
2.22.0


  parent reply	other threads:[~2019-06-21 22:31 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-21 22:30 [PATCH 00/14] completion: a bunch of updates Felipe Contreras
2019-06-21 22:30 ` [PATCH 01/14] completion: zsh: fix __gitcomp_direct() Felipe Contreras
2019-06-22 15:03   ` Felipe Contreras
2019-06-21 22:30 ` [PATCH 02/14] completion: zsh: fix for directories with spaces Felipe Contreras
2019-06-21 22:30 ` [PATCH 03/14] completion: remove zsh hack Felipe Contreras
2019-06-21 22:30 ` [PATCH 04/14] completion: zsh: improve main function selection Felipe Contreras
2019-06-21 22:30 ` [PATCH 05/14] completion: prompt: fix color for Zsh Felipe Contreras
2019-06-21 22:30 ` [PATCH 06/14] completion: bash: cleanup cygwin check Felipe Contreras
2019-06-21 22:31 ` Felipe Contreras [this message]
2019-06-21 22:31 ` [PATCH 08/14] completion: bash: remove old compat wrappers Felipe Contreras
2019-06-21 22:31 ` [PATCH 09/14] completion: bash: remove zsh wrapper Felipe Contreras
2019-06-21 22:31 ` [PATCH 10/14] completion: zsh: trivial cleanups Felipe Contreras
2019-06-21 22:31 ` [PATCH 11/14] test: completion: tests for __gitcomp regression Felipe Contreras
2019-07-03 17:38   ` Junio C Hamano
2019-07-03 17:49   ` SZEDER Gábor
2019-06-21 22:31 ` [PATCH 12/14] test: completion: use global config Felipe Contreras
2019-07-03 17:22   ` Junio C Hamano
2019-06-21 22:31 ` [PATCH 13/14] completion: add default options Felipe Contreras
2019-06-22  3:01   ` Duy Nguyen
2019-06-22  4:36     ` Felipe Contreras
2019-06-24 17:22     ` Junio C Hamano
2019-06-25  1:38       ` Felipe Contreras
2019-06-25  3:32         ` Duy Nguyen
2019-06-21 22:31 ` [PATCH 14/14] completion: add default merge strategies Felipe Contreras
2019-06-24 17:23   ` Junio C Hamano
2019-06-25  1:11     ` Felipe Contreras
2019-06-25  1:43       ` Junio C Hamano
2019-07-03 17:14       ` SZEDER Gábor
2019-07-03 17:50 ` [PATCH 00/14] completion: a bunch of updates Junio C Hamano
2019-07-03 19:06   ` SZEDER Gábor
2020-10-25  3:51     ` Felipe Contreras
2020-10-25  3:46   ` Felipe Contreras
2020-10-27 20:23     ` Junio C Hamano
2020-10-27 22:19       ` Felipe Contreras
2020-10-27 23:32         ` Junio C Hamano
2020-10-28  0:06           ` Felipe Contreras
2020-10-28  9:09             ` Stefan Haller
2020-10-28 16:31               ` Felipe Contreras
2020-10-28 17:34                 ` Stefan Haller
2020-10-29 17:16                 ` Junio C Hamano
2020-10-29 17:27                   ` Junio C Hamano
2020-11-02 20:18                     ` Felipe Contreras
2020-11-03  1:49                       ` Junio C Hamano
2020-11-04  0:09                         ` Felipe Contreras
2020-11-04 18:08                           ` Junio C Hamano
2020-11-05  1:09                             ` Felipe Contreras
2020-11-05 22:09                               ` Junio C Hamano
2020-10-30  8:01                   ` Stefan Haller
2020-10-30 17:19                     ` Junio C Hamano
2020-11-02 20:29                       ` Felipe Contreras
2020-11-02 23:05                         ` Aaron Schrab
2020-11-03  1:35                           ` Junio C Hamano
2020-11-03 23:46                             ` Felipe Contreras
2020-11-03 22:37                           ` Felipe Contreras
2020-11-03  9:59                       ` Stefan Haller
2020-11-03 17:12                         ` Junio C Hamano
2020-11-03 20:07                           ` Stefan Haller
2020-11-02 19:18                   ` Felipe Contreras

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190621223107.8022-8-felipe.contreras@gmail.com \
    --to=felipe.contreras@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=pclouds@gmail.com \
    --cc=szeder.dev@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).