Use compgen -W in gcc completion.
This commit is contained in:
parent
a679544447
commit
147642d722
@ -4340,9 +4340,10 @@ _gcc()
|
||||
# sink stderr:
|
||||
# for C/C++/ObjectiveC it's useless
|
||||
# for FORTRAN/Java it's an error
|
||||
COMPREPLY=( $( $cc --help 2>/dev/null | tr '\t' ' ' | \
|
||||
COMPREPLY=( $( compgen -W "$( $cc --help 2>/dev/null | \
|
||||
tr '\t' ' ' | \
|
||||
sed -e '/^ *-/!d' -e 's/ *-\([^ ]*\).*/-\1/' | \
|
||||
command grep "^$cur" | sort -u ) )
|
||||
sort -u )" -- $cur ) )
|
||||
else
|
||||
_filedir
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user