From: dana <dana@dana.is>
To: Eitan Adler <lists@eitanadler.com>
Cc: zsh-workers@zsh.org
Subject: Re: [PATCH] _gcc: add some clang specific warnings
Date: Mon, 6 Jan 2020 22:16:40 -0600 [thread overview]
Message-ID: <675ADBBB-4F6E-4A7C-8214-7D1E449B4B5E@dana.is> (raw)
In-Reply-To: <20200105185211.11610-1-lists@eitanadler.com>
On 5 Jan 2020, at 12:52, Eitan Adler <lists@eitanadler.com> wrote:
> This adds some missing completions to the _gcc completer for clang.
> Sadly clang does not support --help=warnings so it is not complete.
Merged. It occurred to me that it won't work quite accurately on macOS,
though, because gcc is actually clang there.
I think this should address it. Or should we go even further and try to be
clever about which options to provide for CFLAGS, &al.? All we could do with
that is guess, i suppose.
dana
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
next prev parent reply other threads:[~2020-01-07 4:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-05 18:52 Eitan Adler
2020-01-07 4:16 ` dana [this message]
2020-01-08 4:57 ` Eitan Adler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=675ADBBB-4F6E-4A7C-8214-7D1E449B4B5E@dana.is \
--to=dana@dana.is \
--cc=lists@eitanadler.com \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).