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:
parent
878c9dd5c9
commit
ea0ee6a46b
@ -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 }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user