zsh-workers
 help / color / mirror / code / Atom feed
* Completion: How to emulate what this zstyle does natuarlly in a completion function?
@ 2018-05-26  7:05 Doron Behar
  2018-05-27  3:45 ` Bart Schaefer
  0 siblings, 1 reply; 3+ messages in thread
From: Doron Behar @ 2018-05-26  7:05 UTC (permalink / raw)
  To: zsh-workers

Since I first installed zsh, probably when I ran `zsh-newuser-install`,
I had the following line in my `~/.zshrc`:

    zstyle ':completion:*:kill:*' command 'ps -u $USER -o pid,%cpu,tty,cputime,cmd'

I know that if I remove this line, the `kill` command's completion is
pretty poor and it completes processes from the current tty only. With
this statement in my `~/.zshrc`, `kill` is completed with all processes
of the current user.

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`.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-05-27  8:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-26  7:05 Completion: How to emulate what this zstyle does natuarlly in a completion function? Doron Behar
2018-05-27  3:45 ` Bart Schaefer
2018-05-27  8:53   ` Doron Behar

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