make _filedir_xspec() use the basename of commands when looking for matching

exclusion specs (acroread <Tab> worked, whereas /opt/bin/acroread <Tab>
  did not)
This commit is contained in:
ianmacd 2002-01-24 20:20:31 +00:00
parent a06bbf97ed
commit 71807594e7

View File

@ -2,7 +2,7 @@
#
# <![CDATA[
#
# $Id: bash_completion,v 1.70 2002/01/24 05:03:26 ianmacd Exp $
# $Id: bash_completion,v 1.71 2002/01/24 21:20:31 ianmacd Exp $
#
# Copyright (C) Ian Macdonald <ian@caliban.org>
#
@ -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%% *}