Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Completion: How to emulate what this zstyle does natuarlly in a completion function?



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



Messages sorted by: Reverse Date, Date, Thread, Author