[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 147642d722ebbb21ed6d9e50149cc3b89649b77f
Ville Skyttä
ville.skytta at iki.fi
Sun May 10 17:31:32 UTC 2009
The following commit has been merged in the master branch:
commit 147642d722ebbb21ed6d9e50149cc3b89649b77f
Author: Ville Skyttä <ville.skytta at iki.fi>
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
More information about the Bash-completion-commits
mailing list