Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: clang completion
- X-seq: zsh-workers 43150
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: clang completion
- Date: Sun, 8 Jul 2018 06:40:08 +0000
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= daniel.shahaf.name; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; bh=JDEzLT1SmKULpagGpzlwvu/I9vioD Qd7U3jrd5iXAXU=; b=AayofcpQ2E7uP4k+eVzSKNPMoe/IWLkjysCuMPpUe+otU AwEeGLp6YLnIGFm2EYkEqZG4Ba1DyM825dNUU9ASdGfjg7POiAFOzSHz0vq2rVX5 ocWl7zTVSGz6wcmTn/i5/lkt7Pq4QBRocc9dz/qbNhCEpZnw6yDVSJuw6dDwPumz KiPyRd6JSRClVJZ+RqJzYaQW4v/CWtFM19kIvtf6KlilQcib3o/wRNMXi04eSgsd umBA0UV7YJh3owg+N2vG3g/1ILoWJpQjcESyU6ceiR6SkEdAfp8M+9BKwc3GRg6P 481gpEvI1l08AZfde/00nBzMlfFWkgeO3JQeMLIjA==
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; bh=JDEzLT1SmKULpagGpzlwvu/I9vioD Qd7U3jrd5iXAXU=; b=tvFsRb2KpsUb/5BQAnR1OJZVBNALB+yb3IfsE2S+Vqcyf QCeHunn+I/F5eHK6YbCzs6VDJxCpDAiLQn+xfp3aQc6UW+bqEhWRZhLbYB2pfmWr MvzbNu9Cf0hcUEZKH3tYjcGaMrqGk8/ls4Z+XwPKmKLSZ7TNRCEKhmGyddyBMr3N SostqQvTtVloSnFlTpmLTkmuz7Bb1n22pUQaBq3Oo9DOQ8R+q4N9ApKIVJcgIYW5 nFh4D4E0YHw9LXTu6qs6H6szGMFw81sCzeML+4hBuEl9ZcrhAyCaZgZ+n1y11Z9q O06+/ILDFKXXajzoP4LOyUrN3gQgQ1PvJl45NtJ0A==
- In-reply-to: <20180707205750.GA62923@CptOrmolo.darkstar>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CAF6rxgk2uiZ1wxHYtVKEZO=b4Voitz9sB8jU1ta1Evxv78FU-A@mail.gmail.com> <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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author