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

Re: how to customize _all_matches use?



Here's some deconfusion for the manual.  The additional details will be
relevant to all versions for a long time (certainly 4.2).  I've
confirmed it works with the head of the main line.

Index: Doc/Zsh/compsys.yo
===================================================================
RCS file: /cvsroot/zsh/zsh/Doc/Zsh/compsys.yo,v
retrieving revision 1.200
diff -u -r1.200 compsys.yo
--- Doc/Zsh/compsys.yo	28 May 2007 22:57:40 -0000	1.200
+++ Doc/Zsh/compsys.yo	16 Jun 2007 17:39:01 -0000
@@ -2726,9 +2726,16 @@
 zstyle ':completion:all-matches:*' old-matches only
 zstyle ':completion:all-matches::::' completer _all_matches)
 
-Note that this does not generate completions by itself.  First use
+Note that this does not generate completions by itself:  first use
 any of the standard ways of generating a list of completions,
-then use tt(^Xa) to show all matches.
+then use tt(^Xa) to show all matches.  It is possible instead to
+add a standard completer to the list and request that the
+list of all matches should be directly inserted:
+
+example(zstyle ':completion:all-matches::::' completer _all_matches _complete
+zstyle ':completion:all-matches:*' insert true)
+
+In this case the tt(old-matches) style should not be set.
 )
 findex(_approximate)
 item(tt(_approximate))(

-- 
Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/



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