From 4858e868dcf809016a1cb5680327d66d551353ae Mon Sep 17 00:00:00 2001 From: dana Date: Wed, 8 Jan 2020 17:54:46 -0600 Subject: 45261: _gcc: Detect clang-as-gcc --- Completion/Unix/Command/_gcc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Completion') diff --git a/Completion/Unix/Command/_gcc b/Completion/Unix/Command/_gcc index bbfbc2b9e..9ec09200e 100644 --- a/Completion/Unix/Command/_gcc +++ b/Completion/Unix/Command/_gcc @@ -13,6 +13,11 @@ if [[ "$service" = -value-* ]]; then args2=() fi else + # On some systems (macOS), cc/gcc/g++ are actually clang; treat them accordingly + [[ $service != clang* ]] && + _pick_variant clang=clang unix --version && + service=clang-$service + args2=( '*:input file:_files -g "*.([cCmisSoak]|cc|cpp|cxx|ii|k[ih])(-.)"' ) fi -- cgit 1.4.1