zsh-workers
 help / color / mirror / code / Atom feed
From: Daniel Shahaf <d.s@daniel.shahaf.name>
To: zsh-workers@zsh.org
Subject: Re: clang completion
Date: Sun, 8 Jul 2018 06:40:08 +0000	[thread overview]
Message-ID: <20180708064008.rkjzh2h376kqehs6@tarpaulin.shahaf.local2> (raw)
In-Reply-To: <20180707205750.GA62923@CptOrmolo.darkstar>

Matthew Martin wrote on Sat, Jul 07, 2018 at 15:57:51 -0500:
> local -a options=(${${${(f)"$(_call_program clang clang --autocomplete=${words[CURRENT]/=/\=,})"}//:/\\:}/$'\t'/:})

Note that it's not trivial to support _approximate or _correct here, because
the --autocomplete contract is "give me a prefix", not "give me all possible
matches for me to sort out".  That is: clang wants to do the matching itself,
and it doesn't honour zstyle's.

Debian's bts(1) has the same issue in its 'listcachedbugs' subcommand.
I suppose that as an ecosystem we should be trying to get upstreams not to
implement the clang/bts semantics but a "dump all possible values for this
word" semantics.

Cheers,

Daniel
(still hoping for a world in which all commands have
a --output-my-grammar-in-a-well-known,-machine-parseable-format flag)

> compset -P '*='
> _describe options options


  reply	other threads:[~2018-07-08  6:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-30  8:34 Eitan Adler
2018-07-07 20:57 ` Matthew Martin
2018-07-08  6:40   ` Daniel Shahaf [this message]
2018-07-08 12:40     ` Oliver Kiddle
2018-07-08 14:02       ` Eric Cook
2018-07-08 21:34         ` Oliver Kiddle
2018-07-09 10:19           ` Daniel Shahaf

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=20180708064008.rkjzh2h376kqehs6@tarpaulin.shahaf.local2 \
    --to=d.s@daniel.shahaf.name \
    --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).