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
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
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits