diff --git a/bash_completion b/bash_completion index dea0b191..814c8765 100644 --- a/bash_completion +++ b/bash_completion @@ -1657,7 +1657,7 @@ _filedir_xspec() _expand || return 0 # 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 ) # prune to leave nothing but the -X spec xspec=${xspec#*-X }