gcc: Don't use \t in sed as it's not POSIX compliant.

This commit is contained in:
Igor Murzov 2011-12-21 01:03:21 +04:00
parent 15f5c80c2e
commit e6bef775a5

View File

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