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

Re: Expand from completion



GoTaR wrote:
> 
> I don't remember if I asked it allready, but there is new version
> coming, so maybe once more: how to expand sth like this:
> 
> ~: rpm -qi *devel*[tab]

> ? I'd like to bring all matches to command line:

Sounds like you want to use the _all_matches completer, probably in
combination with _match. _all_matches should go at the beginning of the
list of completers, before _complete or _match.

> For files it works with ^x-* (or with some style/sth with tab).

If you want it to be bound to a key instead of part of the things tab
will do, create a new widget using _generic:
  zle -C all-matches complete-word _generic
  bindkey '^Xx' all-matches
  
Then put `all-matches' in the widget part of the context for any styles
you want to set. As a minimum, you'll need to set the completer style:
  zstyle ':completion:all-matches::::' completer _all_matches _complete _match

Oliver



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