diff options
author | Yuka Takahashi <yukatkh@gmail.com> | 2017-06-28 16:29:26 +0000 |
---|---|---|
committer | Yuka Takahashi <yukatkh@gmail.com> | 2017-06-28 16:29:26 +0000 |
commit | af42c8bd388d0e6369a9e5c1041b2e9126cb6f50 (patch) | |
tree | 814bfa60c28db33a3298e715cdc821181ddb5297 /utils/bash-autocomplete.sh | |
parent | ddb61cae6a5e7f3f0bc5da4290334368d03da2a0 (diff) | |
download | clang-af42c8bd388d0e6369a9e5c1041b2e9126cb6f50.tar.gz |
[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
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@306559 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/bash-autocomplete.sh')
-rw-r--r-- | utils/bash-autocomplete.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/utils/bash-autocomplete.sh b/utils/bash-autocomplete.sh index 46e29b87bb..775b1f4535 100644 --- a/utils/bash-autocomplete.sh +++ b/utils/bash-autocomplete.sh @@ -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 |