Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Programmatically loading completion for another command?
- X-seq: zsh-workers 50300
- From: "Daniel Shahaf" <d.s@xxxxxxxxxxxxxxxxxx>
- To: "Zsh hackers list" <zsh-workers@xxxxxxx>, Vorpal <zsh@xxxxxxxxx>
- Subject: Re: Programmatically loading completion for another command?
- Date: Fri, 27 May 2022 17:46:32 +0000
- Archived-at: <https://zsh.org/workers/50300>
- Feedback-id: i425e4195:Fastmail
- In-reply-to: <CAH+w=7aTQTVn6tcn8JQAoJOUM0WYU652DcoY80quVs+Qb9h-rA@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <946346f8-5df9-d551-d199-bf62e0267b41@vorpal.se> <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@xxxxxxxxx> 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.)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author