You are not logged in.
I really like the kill autocomplete functionality of zsh. I was wondering is there any way of using this with other programs that require pids. I wanted to use it with cpulimit. I saw this:
zstyle ':completion:*:*:kill:*' menu yes select
zstyle ':completion:*:kill:*' force-list always
and was hoping I could do something like
cpulimit -p <tab>
and get the same results of
kill <tab>
I have been trying different combinations but I do not understand the syntax above at all. It is only my second day of zsh so I still kind of suck. Just curious if this is possible or if this function is reserved for kill only.
Edit: Figured it out. If anyone comes across this add this to your .zshrc:
compdef _pids cpulimit
Where "cpulimit" is the command you want pid autocompletion on.
Last edited by dodo3773 (2011-06-20 03:12:44)
Offline