[PATCH] D34761: [Bash-autocompletion] Invoke clang where user called
Yuka Takahashi via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 28 09:23:22 PDT 2017
yamaguchi created this revision.
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`.
https://reviews.llvm.org/D34761
Files:
clang/utils/bash-autocomplete.sh
Index: clang/utils/bash-autocomplete.sh
===================================================================
--- clang/utils/bash-autocomplete.sh
+++ clang/utils/bash-autocomplete.sh
@@ -24,7 +24,7 @@
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D34761.104438.patch
Type: text/x-patch
Size: 483 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170628/a3f03d72/attachment.bin>
More information about the cfe-commits
mailing list