summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorRamkumar Ramachandra <artagnon@gmail.com>2014-01-05 15:48:02 +0530
committerJunio C Hamano <gitster@pobox.com>2014-01-06 09:14:29 -0800
commitd028b8906afb5b8c24c9449f26e5f930750d8df7 (patch)
treef74f7fee8b28f757b3d175995f3dd107e008f158 /contrib
parent44484662d83de2ae98d04738ec43d4dea1f859a8 (diff)
downloadgit-d028b8906afb5b8c24c9449f26e5f930750d8df7.tar.gz
zsh completion: find matching custom bash completion
If zsh completion is being read from a location that is different from system-wide default, it is likely that the user is trying to use a custom version, perhaps closer to the bleeding edge, installed in her own directory. We will more likely to find the matching bash completion script in the same directory than in those system default places. Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib')
-rw-r--r--contrib/completion/git-completion.zsh2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/completion/git-completion.zsh b/contrib/completion/git-completion.zsh
index fac5e711eb..6fca145c06 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