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

PATCH: Re: Using _values with ->state transitions?



Bart Schaefer wrote:

> ...
> 
> } Should we add that or just document what the function handling the
> } `->state' would have to do?
> 
> Documenting what the ->state handler should do would be nice, yes.

...

Bye
  Sven

Index: Doc/Zsh/compsys.yo
===================================================================
RCS file: /cvsroot/zsh/zsh/Doc/Zsh/compsys.yo,v
retrieving revision 1.123
diff -u -r1.123 compsys.yo
--- Doc/Zsh/compsys.yo	2001/05/08 12:24:21	1.123
+++ Doc/Zsh/compsys.yo	2001/05/09 08:52:20
@@ -4002,6 +4002,16 @@
 function the tt(context) parameter will be set to the name of the
 value whose argument is to be completed.
 
+Note also that tt(_values) normally adds the character used as the
+separator between values as a auto-removable suffix so that users don't
+have to type it themselves.  But when using a `tt(->)var(string)' action
+tt(_values) can't do that because the matches for the argument will be
+generated by the calling function.  To get the usual behaviour, the
+implementor of the calling function has to add the suffix directly by
+passing the options `tt(-qS) var(x)' (where var(x) is the separator
+character specified with the tt(-s) option of tt(_values)) to the
+function generating the matches or to the tt(compadd) builtin.
+
 Like tt(_arguments), tt(_values) supports the tt(-C) option in
 which case you have to make the parameter tt(curcontext) local instead 
 of tt(context) (as described above).

-- 
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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