zsh-workers
 help / color / mirror / code / Atom feed
* completions for c99
@ 2020-04-30 20:40 Vincent Lefevre
  2020-04-30 22:17 ` Daniel Shahaf
  0 siblings, 1 reply; 3+ messages in thread
From: Vincent Lefevre @ 2020-04-30 20:40 UTC (permalink / raw)
  To: zsh-workers

c99 should be added to the command list of
"functions/Completion/Unix/_gcc".

Note: c99 is the name of the C compiler specified by POSIX.

-- 
Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: completions for c99
  2020-04-30 20:40 completions for c99 Vincent Lefevre
@ 2020-04-30 22:17 ` Daniel Shahaf
  2020-05-01  0:15   ` Vincent Lefevre
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Shahaf @ 2020-04-30 22:17 UTC (permalink / raw)
  To: Vincent Lefevre, zsh-workers

Vincent Lefevre wrote on Thu, 30 Apr 2020 20:40 +00:00:
> c99 should be added to the command list of
> "functions/Completion/Unix/_gcc".

That would cause several hundred options to be offered, but on some
systems c99(1) supports far fewer options:

https://pubs.opengroup.org/onlinepubs/9699919799/utilities/c99.html
https://www.freebsd.org/cgi/man.cgi?query=c99&manpath=FreeBSD+12.1-RELEASE

We probably need a bit of $service-specific code, to see whether c99(1) is
in fact gcc or clang, in which case we can fall back to offering all
their options, or not, in which case we should offer just the handful of
options that's in fact supported.

Anyone interested in writing the patch?

> Note: c99 is the name of the C compiler specified by POSIX.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: completions for c99
  2020-04-30 22:17 ` Daniel Shahaf
@ 2020-05-01  0:15   ` Vincent Lefevre
  0 siblings, 0 replies; 3+ messages in thread
From: Vincent Lefevre @ 2020-05-01  0:15 UTC (permalink / raw)
  To: zsh-workers

On 2020-04-30 22:17:43 +0000, Daniel Shahaf wrote:
> Vincent Lefevre wrote on Thu, 30 Apr 2020 20:40 +00:00:
> > c99 should be added to the command list of
> > "functions/Completion/Unix/_gcc".
> 
> That would cause several hundred options to be offered, but on some
> systems c99(1) supports far fewer options:
> 
> https://pubs.opengroup.org/onlinepubs/9699919799/utilities/c99.html

Note that POSIX lists the minimum that needs to be supported.

> https://www.freebsd.org/cgi/man.cgi?query=c99&manpath=FreeBSD+12.1-RELEASE
> 
> We probably need a bit of $service-specific code, to see whether c99(1) is
> in fact gcc or clang, in which case we can fall back to offering all
> their options, or not, in which case we should offer just the handful of
> options that's in fact supported.

I've noticed that cc is in the list, and on some platforms, it may
also support fewer options. This can even include Debian machines,
where cc is (at least) either gcc or tcc, depending on the system
configuration.

-- 
Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-05-01  0:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-30 20:40 completions for c99 Vincent Lefevre
2020-04-30 22:17 ` Daniel Shahaf
2020-05-01  0:15   ` Vincent Lefevre

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).