Skip to content

Commit

Permalink
Revert "Fix completion loading when a symlink is sourced, thanks to J…
Browse files Browse the repository at this point in the history
…onathan Nieder"

This reverts commit 318759c.
  • Loading branch information
dpaleino committed Jan 11, 2012
1 parent 318759c commit 2ad325d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions bash_completion
Original file line number Diff line number Diff line change
Expand Up @@ -1916,8 +1916,7 @@ _minimal()
_completion_loader()
{
local compdir=./completions
local compscript=$(readlink -f $BASH_SOURCE)
[[ $compscript == */* ]] && compdir="${compscript%/*}/completions"
[[ $BASH_SOURCE == */* ]] && compdir="${BASH_SOURCE%/*}/completions"

# Try basename.
. "$compdir/${1##*/}" &>/dev/null && return 124
Expand All @@ -1938,8 +1937,7 @@ _xfunc()
shift
declare -F $1 &>/dev/null || {
local compdir=./completions
local compscript=$(readlink -f $BASH_SOURCE)
[[ $compscript == */* ]] && compdir="${compscript%/*}/completions"
[[ $BASH_SOURCE == */* ]] && compdir="${BASH_SOURCE%/*}/completions"
. "$compdir/$srcfile"
}
"$@"
Expand Down

0 comments on commit 2ad325d

Please sign in to comment.