The following commit has been merged in the master branch:
commit 147642d722ebbb21ed6d9e50149cc3b89649b77f
Author: Ville Skyttä <[email protected]>
Date:   Sun May 10 20:31:28 2009 +0300

    Use compgen -W in gcc completion.

diff --git a/bash_completion b/bash_completion
index aa4aba3..914fb65 100644
--- a/bash_completion
+++ b/bash_completion
@@ -4340,9 +4340,10 @@ _gcc()
                # sink stderr:
                # for C/C++/ObjectiveC it's useless
                # for FORTRAN/Java it's an error
-               COMPREPLY=( $( $cc --help 2>/dev/null | tr '\t' ' ' | \
+               COMPREPLY=( $( compgen -W "$( $cc --help 2>/dev/null | \
+                              tr '\t' ' ' | \
                               sed -e '/^  *-/!d' -e 's/ *-\([^ ]*\).*/-\1/' | \
-                              command grep "^$cur" | sort -u ) )
+                              sort -u )" -- $cur ) )
        else
                _filedir
        fi

-- 
bash-completion

_______________________________________________
Bash-completion-commits mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/bash-completion-commits

Reply via email to