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?



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