summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Murzov <e-mail@date.by>2011-12-21 01:03:21 +0400
committerIgor Murzov <e-mail@date.by>2011-12-21 01:03:21 +0400
commite6bef775a5d3ff44c646d0929776d85121ed0554 (patch)
treef7382c818ac1383d055bb903f13a2502a2f4db22
parent15f5c80c2e13e23b76d8d92c0dffcb15acc654d3 (diff)
downloadbash-completion-e6bef775a5d3ff44c646d0929776d85121ed0554.tar.gz
gcc: Don't use \t in sed as it's not POSIX compliant.
-rw-r--r--completions/gcc5
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