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

Re: Questions about _values



>>>>> Dra  <Dra> writes:

> Argument is a PID, completed with _values. 

Have you looked at the "kill" completions?  It already does basically
what you are trying to do.. here are some style settings that may be
useful:

zstyle ':completion:*' select-prompt ""
zstyle ':completion:*' select-scroll -2
zstyle ':completion:*:*:kill:*' verbose yes
zstyle ':completion:*:*:kill:*' insert-ids longer
zstyle ':completion:*:*:kill:*:processes' command "ps $( (($UID == 0)) && echo a)uxwh"

I prefer to set insert-ids to single, but that breaks menu-select.
I have a fix I'll be submitting soon.

> 4. If I keep pressing TAB, zsh will offer completions. Is there a way to
>    make it highlight (print the characters in bold or some color, for
>    example) the offered item and its description in the list?

Yes, menu-select:

zmodload -i zsh/complist
bindkey '\M-\t' 'menu-select'

greg



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