git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 4/4] completion: prefer to use local git-completion.bash

From
Ramkumar Ramachandra <artagnon@gmail.com>
Date
Jun 28, 2013, 14:18 UTC
Message-ID
<1372429088-385-5-git-send-email-artagnon@gmail.com>
In-Reply-To
<1372429088-385-1-git-send-email-artagnon@gmail.com>

git-completion.zsh looks in various "default" locations for git-completion.bash. During development, the location

  $(dirname ${funcsourcetrace[1]%:*})/git-completion.bash

is the most obvious and up-to-date version. Push it up on the list of locations.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
---
 contrib/completion/git-completion.zsh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/contrib/completion/git-completion.zsh b/contrib/completion/git-completion.zsh
index fac5e71..6fca145 100644
--- a/contrib/completion/git-completion.zsh
+++ b/contrib/completion/git-completion.zsh
@@ -30,10 +30,10 @@ if [ -z "$script" ]; then
 	local -a locations
 	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
-		$(dirname ${funcsourcetrace[1]%:*})/git-completion.bash
 		)
 	for e in $locations; do
 		test -f $e && script="$e" && break
-- 
1.8.3.1.585.g9832cb9
Previous: Ramkumar Ramachandra
Message 11 of 11 in “Batch completion improvements”
  1. 0/4 Batch completion improvementsRamkumar Ramachandra, Jun 28, 2013
  2. 1/4 completion: complete rebase --edit-todoRamkumar Ramachandra, Jun 28, 2013
  3. 2/4 completion: add completer for statusRamkumar Ramachandra, Jun 28, 2013
  4. SZEDER GáborJun 30, 2013
  5. Ramkumar RamachandraJun 30, 2013
  6. 3/4 completion: add completer for rev-parseRamkumar Ramachandra, Jun 28, 2013
  7. SZEDER GáborJun 30, 2013
  8. Ramkumar RamachandraJun 30, 2013
  9. Junio C HamanoJun 30, 2013
  10. Ramkumar RamachandraJul 3, 2013
  11. 4/4 completion: prefer to use local git-completion.bashRamkumar Ramachandra, Jun 28, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.