diff options
-rw-r--r-- | completions/gcc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/completions/gcc b/completions/gcc index 9dc21c74..c86fd7e6 100644 --- a/completions/gcc +++ b/completions/gcc @@ -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 |