[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 1.90-127-g318759c
David Paleino
dapal at debian.org
Wed Jan 11 13:37:20 UTC 2012
The following commit has been merged in the master branch:
commit 318759c8497cfce3704bc1b97c41459a5be08f7b
Author: David Paleino <dapal at debian.org>
Date: Wed Jan 11 14:37:15 2012 +0100
Fix completion loading when a symlink is sourced, thanks to Jonathan Nieder
diff --git a/bash_completion b/bash_completion
index ef79f0a..509ad88 100644
--- a/bash_completion
+++ b/bash_completion
@@ -1916,7 +1916,8 @@ _minimal()
_completion_loader()
{
local compdir=./completions
- [[ $BASH_SOURCE == */* ]] && compdir="${BASH_SOURCE%/*}/completions"
+ local compscript=$(readlink -f $BASH_SOURCE)
+ [[ $compscript == */* ]] && compdir="${compscript%/*}/completions"
# Try basename.
. "$compdir/${1##*/}" &>/dev/null && return 124
@@ -1937,7 +1938,8 @@ _xfunc()
shift
declare -F $1 &>/dev/null || {
local compdir=./completions
- [[ $BASH_SOURCE == */* ]] && compdir="${BASH_SOURCE%/*}/completions"
+ local compscript=$(readlink -f $BASH_SOURCE)
+ [[ $compscript == */* ]] && compdir="${compscript%/*}/completions"
. "$compdir/$srcfile"
}
"$@"
--
bash-completion
More information about the Bash-completion-commits
mailing list