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

Re: Problem with complete-all



Jesper Holmberg wrote:
> I can't get complete-all to work as I would like it to. Perhaps I have

> This is what I have in my .zshrc, taken from the manual:

It seems we need to fix the example in the manual.

> zle -C all-matches complete-word _generic
> bindkey '^Xx' all-matches
> zstyle ':completion:all-matches:*' old-matches only
> zstyle ':completion:all-matches::::' completer _all_matches

Try changing the last style to add _complete after _all_matches:
  zstyle ':completion:all-matches::::' completer _all_matches _complete
It needs _complete there to actually generate some matches.

I also use this:
  zstyle ':completion:all-matches:*' insert true
which makes it just insert the matches instead of giving you them as
an extra match.

and this:
  zstyle ':completion:all-matches:*' file-patterns \
      '%p:globbed-files' '*(-/):directories' '*:all-files'
That prevents it from inserting all the sub-directories in cases where
subdirectories are only completed to allow you to complete files within
them.

Oliver



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