summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Murzov <e-mail@date.by>2011-12-20 00:09:02 +0400
committerIgor Murzov <e-mail@date.by>2011-12-20 19:56:36 +0400
commit3be0b2658178c3d8d17f16c0a42f2fc08a4086f3 (patch)
treed8c645e8662cad923c40d76b50c390b64e75f542
parentdab2f3c5519d01902e795e583b0546eb30bd04c7 (diff)
downloadbash-completion-3be0b2658178c3d8d17f16c0a42f2fc08a4086f3.tar.gz
gcc: Don't allow "[]<>" in options list.
-rw-r--r--completions/gcc3
1 files changed, 2 insertions, 1 deletions
diff --git a/completions/gcc b/completions/gcc
index 48ee8e4c..a1f8c0a3 100644
--- a/completions/gcc
+++ b/completions/gcc
@@ -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