Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Completion: How to emulate what this zstyle does natuarlly in a completion function?
- X-seq: zsh-workers 42861
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: "zsh-workers@xxxxxxx" <zsh-workers@xxxxxxx>
- Subject: Re: Completion: How to emulate what this zstyle does natuarlly in a completion function?
- Date: Sat, 26 May 2018 20:45:10 -0700
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=2+ed5S5tPdYs0UP/hzCctcxj4D44Jtm/4V7ir9ZPRpo=; b=llDrSgWppoF/nLLov7p2QUb0f60U5k5fVSMYlGfV5M/CqJc1jDv82n2MvV1enL72Y4 wBPMQx4m4bzYNLqt+dYLCoU67J7i9QFgytp60yebwQ21CG6T+AtzOfnctR0R3MCxYocT W3XUehyVsf9I6GvswH7JiKdoNugyI5yP23XWYR0+3K0fpi1pMcMZwNxzFTgmyPx5O34+ HMMVDphZSVeH4A5qKmexAtE/oRFw0cxqzEF+mGqWDMFQ4qi+xLw9nDhu0UScnNGrCgUF j0+NQHlOR93RmlXQz/Wc3VJBqAJYfxDxP92g2c/o4dXP4jX9VMzxEqRRFgXzGR3Dltzq BgtQ==
- In-reply-to: <20180526070525.xx56q6ilizmslqf6@NUC.doronbehar.com>
- 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: <20180526070525.xx56q6ilizmslqf6@NUC.doronbehar.com>
On Sat, May 26, 2018 at 12:05 AM, Doron Behar <doron.behar@xxxxxxxxx> wrote:
>
> My question is: How do I emulate a completion like that naturally within
> a completion function? I want a certain command's option argument
> completion to suggest all processes the current user just like when I
> try to complete `kill`.
You want to call the _pids helper function from that command's
completion function. _pids will use the current context to look up
the command to use to generate the list of possible process IDs.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author