Fix loading completions when bash_completion was sourced without a path.
This commit is contained in:
parent
86ca9ee598
commit
daa4aba4c8
@ -1816,7 +1816,8 @@ unset -f _install_xspec
|
|||||||
# set up dynamic completion loading
|
# set up dynamic completion loading
|
||||||
_completion_loader()
|
_completion_loader()
|
||||||
{
|
{
|
||||||
local compdir="${BASH_SOURCE[0]%/*}/completions"
|
local compdir=./completions
|
||||||
|
[[ $BASH_SOURCE == */* ]] && compdir="${BASH_SOURCE%/*}/completions"
|
||||||
|
|
||||||
# If full path below completions dir exists, use it.
|
# If full path below completions dir exists, use it.
|
||||||
if [[ $1 == */* && -f "$compdir/$1" ]]; then
|
if [[ $1 == */* && -f "$compdir/$1" ]]; then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user