From daa4aba4c8cfb17be031aba719a5fa50a6ddb825 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Thu, 13 Oct 2011 21:08:43 +0300 Subject: Fix loading completions when bash_completion was sourced without a path. --- bash_completion | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bash_completion b/bash_completion index 4e6f26a8..1a90e9b3 100644 --- a/bash_completion +++ b/bash_completion @@ -1816,7 +1816,8 @@ unset -f _install_xspec # set up dynamic completion loading _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 [[ $1 == */* && -f "$compdir/$1" ]]; then -- cgit v1.2.1