[Bash-autocompletion] Invoke clang where user called
Summary: When user build clang and used completion Eg. `build/bin/clang -fno[tab]`, we want to invoke `build/bin/clang --autocomplete=-fno`, rather than `clang --autocomplete=-fno`. Differential Revision: https://reviews.llvm.org/D34761 llvm-svn: 306559
This commit is contained in:
parent
2cbf03728a
commit
28782bea88
|
@ -24,7 +24,7 @@ _clang()
|
|||
arg="$w2=,$cur"
|
||||
fi
|
||||
|
||||
flags=$( clang --autocomplete="$arg" 2>/dev/null )
|
||||
flags=$( "${COMP_WORDS[0]}" --autocomplete="$arg" 2>/dev/null )
|
||||
# If clang is old that it does not support --autocomplete,
|
||||
# fall back to the filename completion.
|
||||
if [[ "$?" != 0 ]]; then
|
||||
|
|
Loading…
Reference in New Issue