diff --git a/bash_completion b/bash_completion index 747f1d81..db9512c5 100644 --- a/bash_completion +++ b/bash_completion @@ -2,7 +2,7 @@ # # # @@ -1638,7 +1638,7 @@ _filedir_xspec() _expand || return 0 # get first exclusion compspec that matches this command - xspec=$( sed -ne '/ '$1'/{p;q;}' /etc/bash_completion ) + xspec=$( sed -ne '/ '${1##*/}'/{p;q;}' /etc/bash_completion ) # prune to leave nothing but the -X spec xspec=${xspec#*-X } xspec=${xspec%% *}