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:
parent
a06bbf97ed
commit
71807594e7
@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# <![CDATA[
|
# <![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>
|
# Copyright (C) Ian Macdonald <ian@caliban.org>
|
||||||
#
|
#
|
||||||
@ -1638,7 +1638,7 @@ _filedir_xspec()
|
|||||||
_expand || return 0
|
_expand || return 0
|
||||||
|
|
||||||
# get first exclusion compspec that matches this command
|
# 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
|
# prune to leave nothing but the -X spec
|
||||||
xspec=${xspec#*-X }
|
xspec=${xspec#*-X }
|
||||||
xspec=${xspec%% *}
|
xspec=${xspec%% *}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user