[Bash-completion-commits] [SCM] bash-completion branch, dynamic-loading, updated. 1.3-473-g1bdf31c

Ville Skyttä ville.skytta at iki.fi
Mon Oct 24 17:41:32 UTC 2011


The following commit has been merged in the dynamic-loading branch:
commit 1bdf31c894835ecd28ba196a7f2d6e1b467010cf
Author: Igor Murzov <intergalactic.anonymous at gmail.com>
Date:   Sun Oct 23 03:48:40 2011 +0400

    Don't use full path in the _completion_loader() function.

diff --git a/bash_completion b/bash_completion
index 8b6cdb4..eb5fffc 100644
--- a/bash_completion
+++ b/bash_completion
@@ -1832,17 +1832,12 @@ _completion_loader()
     local compdir=./completions
     [[ $BASH_SOURCE == */* ]] && compdir="${BASH_SOURCE%/*}/completions"
 
-    # If full path below completions dir exists, use it.
-    if [[ $1 == */* && -f "$compdir/$1" ]]; then
-        . "$compdir/$1" &>/dev/null && return 124 || return 1
-    fi
-
     # Special case for init.d scripts.
     if [[ $1 == /etc?(/rc.d)/init.d/* ]]; then
         . "$compdir/service" &>/dev/null && return 124 || return 1
     fi
 
-    # Finally, try basename.
+    # Try basename.
     . "$compdir/${1##*/}" &>/dev/null && return 124
 
     # Need to define *something*, otherwise there will be no completion at all.

-- 
bash-completion



More information about the Bash-completion-commits mailing list