Fix installing simple xspec completions on systems with non-GNU sed.

There's no alternation functionality ('\|' or '|') in POSIX BRE.
This commit is contained in:
Ville Skyttä 2010-01-16 15:38:49 +02:00
parent 878c9dd5c9
commit ea0ee6a46b

View File

@ -1657,7 +1657,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 $'/^complete .*[ \t]'${1##*/}$'\([ \t]\|$\)/{p;q;}' \ xspec=$( awk "/^complete[[:space:]]+.*[[:space:]]${1##*/}([[:space:]]|\$)/ { print \$0; exit }" \
$BASH_COMPLETION ) $BASH_COMPLETION )
# prune to leave nothing but the -X spec # prune to leave nothing but the -X spec
xspec=${xspec#*-X } xspec=${xspec#*-X }