zsh-workers
 help / color / mirror / code / Atom feed
From: "Daniel Shahaf" <d.s@daniel.shahaf.name>
To: "Zsh hackers list" <zsh-workers@zsh.org>, Vorpal <zsh@vorpal.se>
Subject: Re: Programmatically loading completion for another command?
Date: Fri, 27 May 2022 17:46:32 +0000	[thread overview]
Message-ID: <b5a4f49e-3151-479a-8bf7-11cf74d5c44a@www.fastmail.com> (raw)
In-Reply-To: <CAH+w=7aTQTVn6tcn8JQAoJOUM0WYU652DcoY80quVs+Qb9h-rA@mail.gmail.com>

Bart Schaefer wrote on Fri, 27 May 2022 17:03 +00:00:
> On Fri, May 27, 2022 at 9:30 AM Vorpal <zsh@vorpal.se> wrote:
>>
>> * How do I trigger loading that file from my completion so I can offer
>> completions to the flag --makepkg-args? Is it even possible?
>
> Something like this should work, no other wrapper needed:
>
>   service=makepkg _sequence $_comps[makepkg]
>
> In my install the service dispatcher function is _pkgtool not _pacman,

There's two different makepkg(1) tools, it seems: the one completed by
zsh's _pkgtool file, and Arch Linux' tool, completed by
<https://gitlab.archlinux.org/pacman/pacman/-/blob/master/scripts/completion/zsh_completion.in>.

> so using $_comps[makepkg] in the call to _sequence should get the
> right one, whichever.
>
> (Nod over to Daniel on the _services thread.)


  reply	other threads:[~2022-05-27 17:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-27 16:29 Vorpal
2022-05-27 17:03 ` Bart Schaefer
2022-05-27 17:46   ` Daniel Shahaf [this message]
2022-05-27 19:58     ` Vorpal
2022-06-02  4:09       ` Bart Schaefer

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=b5a4f49e-3151-479a-8bf7-11cf74d5c44a@www.fastmail.com \
    --to=d.s@daniel.shahaf.name \
    --cc=zsh-workers@zsh.org \
    --cc=zsh@vorpal.se \
    --subject='Re: Programmatically loading completion for another command?' \
    /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

Code repositories for project(s) associated with this 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).