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 42867
- From: Doron Behar <doron.behar@xxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: Completion: How to emulate what this zstyle does natuarlly in a completion function?
- Date: Sun, 27 May 2018 11:53:57 +0300
- Cc: zsh-workers@xxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to:user-agent; bh=SEyYPIf9czbyS30qSnNgg1BE5ZYq6RbsdgvrGoF/+us=; b=uenHMdQU68K9KoyftLxf+Ws1dehFiA3qHVAAZnrjoHJgy8fdfgODvIWYXoyGPvAH/y zUo4E5bN3iXIkviFiNCPy39Z7Sopt8hI4qgLRb7aANM4/qBLRuMw5uvjnFe5Vr2k4o+n BXxh4DzAdaiws3/h1IIcGvXVfH0x88WT6ppWplVeXT+uzoOFhVZXQY2OQHZv4rnAx+k/ kuUjDb9ZtTTa6dG1Eco1ig+4tX7KLsRwqAmf/07g6ha95kQW6OBoCv/bC/yBuGU8VFKx g9BGTeXYQsed8MeLbRrfCbfMO7sLGCAfs41G4Jj5ZIGXiWJTSg/nHZPVPIfyHxD0UyEZ 3a3w==
- In-reply-to: <CAH+w=7boc+cwuZZ4eqmLNWZbNHWExgmfQr0N6eFx3zkpnDBU+Q@mail.gmail.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>
- Mail-followup-to: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>, zsh-workers@xxxxxxx
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <20180526070525.xx56q6ilizmslqf6@NUC.doronbehar.com> <CAH+w=7boc+cwuZZ4eqmLNWZbNHWExgmfQr0N6eFx3zkpnDBU+Q@mail.gmail.com>
Thanks for your reply Bart,
I tried using `_pids` but it completes pids of processes only in the
current tty. How to I make complete all the processes the user has?
On Sat, May 26, 2018 at 08:45:10PM -0700, Bart Schaefer wrote:
> 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