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

PATCH: Documentation for completer field of context



On Mar 17,  6:20pm, Bart Schaefer wrote:
} Subject: Re: ignored-patterns giving correction a go
}
} Obviously the documentation for using a completer twice doesn't belong
} just under the matcher-list spec any more.

Patch for that, plus a small fix for the zcompile entry.

Index: Doc/Zsh/builtins.yo
===================================================================
RCS file: /extra/cvsroot/zsh/zsh-3.1/Doc/Zsh/builtins.yo,v
retrieving revision 1.56
diff -u -r1.56 builtins.yo
--- builtins.yo	2000/03/15 18:00:49	1.56
+++ builtins.yo	2000/03/17 16:09:11
@@ -1310,7 +1310,7 @@
 )\
 ifnzman(\
 noderef(Functions)
-)
+)\
 for a description of how autoloaded functions are searched).
 
 If there is at least one var(name) argument, the wordcode for all
Index: Doc/Zsh/compsys.yo
===================================================================
RCS file: /extra/cvsroot/zsh/zsh-3.1/Doc/Zsh/compsys.yo,v
retrieving revision 1.136
diff -u -r1.136 compsys.yo
--- compsys.yo	2000/03/15 17:56:49	1.136
+++ compsys.yo	2000/03/17 18:44:52
@@ -292,11 +292,16 @@
 )
 item()(
 The var(completer) currently active, i.e. the name of the completer
-function without the leading underscore. Such a completer is in
-overall control of how completion is to be performed; `tt(complete)'
-is the basic one for ordinary completion, but completers may perform
-various related tasks such as correction, or modify the behaviour of a
-later completer (see
+function without the leading underscore, followed by a minus sign and a
+number.  The number is 1 on the first call to a completer, 2 on the second
+call to the em(same) completer, etc.; this is used to provide fine control
+of when a completion style is used (see `Standard Styles' in
+ifzman(the section `Completion System Configuration' below)\
+ifnzman(noderef(Completion System Configuration)) 
+for examples).  Such a completer is in overall control of how completion
+is to be performed; `tt(complete)' is the basic one for ordinary
+completion, but completers may perform various related tasks such as
+correction, or modify the behaviour of a later completer (see
 ifzman(the section `Control Functions' below)\
 ifnzman(noderef(Control Functions)) 
 for more information).  
@@ -1294,6 +1299,9 @@
 It is sometimes useful to set this style for the tt(correct) or
 tt(approximate) completer so that ignored matches are prefered over
 corrections.
+
+example(zstyle ':completion:*:complete-2:*' prefer-ignored yes
+zstyle ':completion:*:(correct|approximate)-1:*' prefer-ignored yes)
 )
 item(tt(prefix-hidden))(
 This is used when matches with a common prefix are added (e.g. option

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com



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