[Bash-completion-commits] [SCM] bash-completion branch, master, updated. ea0ee6a46b1aa7fcd847dfe3a3c277e603d047c6

Ville Skyttä ville.skytta at iki.fi
Sat Jan 16 13:41:16 UTC 2010


The following commit has been merged in the master branch:
commit ea0ee6a46b1aa7fcd847dfe3a3c277e603d047c6
Author: Ville Skyttä <ville.skytta at iki.fi>
Date:   Sat Jan 16 15:38:49 2010 +0200

    Fix installing simple xspec completions on systems with non-GNU sed.
    
    There's no alternation functionality ('\|' or '|') in POSIX BRE.

diff --git a/bash_completion b/bash_completion
index dea0b19..814c876 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 }

-- 
bash-completion



More information about the Bash-completion-commits mailing list