gcc: Don't allow "[]<>" in options list.

This commit is contained in:
Igor Murzov 2011-12-20 00:09:02 +04:00
parent dab2f3c551
commit 3be0b26581

View File

@ -40,8 +40,9 @@ _gcc()
# for FORTRAN/Java it's an error
COMPREPLY=( $( compgen -W "$( $cc --help 2>/dev/null | \
tr '\t' ' ' | \
sed -e '/^ *-/!d' -e 's/ *-\([^ ]*\).*/-\1/' | \
sed -e '/^ *-/!d' -e 's/ *-\([^][ <>]*\).*/-\1/' | \
sort -u )" -- "$cur" ) )
[[ $COMPREPLY == *= ]] && compopt -o nospace
else
_filedir
fi