From cd2984fb66e630cd107bfa6cde0b868070aa877b Mon Sep 17 00:00:00 2001 From: Sven Wischnowsky Date: Tue, 1 Aug 2000 07:19:15 +0000 Subject: make $compcontext more powerful and easier to use for simple cases --- Doc/Zsh/compsys.yo | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'Doc/Zsh/compsys.yo') diff --git a/Doc/Zsh/compsys.yo b/Doc/Zsh/compsys.yo index de30e0ca8..7687dfb7a 100644 --- a/Doc/Zsh/compsys.yo +++ b/Doc/Zsh/compsys.yo @@ -2313,13 +2313,21 @@ contexts, in most cases named after the context itself named `tt(_tilde)'). Before trying to find a function for a specific context, tt(_complete) -checks if the parameter `tt(compcontext)' is set to a non-empty -value. If it is, the value is taken as the name of the context to use -and the function defined for that context will be called. For this -purpose, there is a special context named tt(-command-line-) that -completes whole command lines (commands and their arguments) and is -not used by the completion system itself, but has a function handling -completion for it. +checks if the parameter `tt(compcontext)' is set. If it is set to an +array, the elements are taken to be the possible matches which will be +completed using the tag `tt(values)' and the description `tt(value)'. +If `tt(compcontext)' to a string containing colons, it should be of +the form `var(tag)tt(:)var(descr)tt(:)var(action)'. In this case the +var(tag) and var(descr) give the tag and description to use and the +var(action) says what should be completed in one of the forms +described for the tt(_arguments) utility function below. + +Finally, if `tt(compcontext)' is set a string without colons, the +value is taken as the name of the context to use and the function +defined for that context will be called. For this purpose, there is a +special context named tt(-command-line-) that completes whole command +lines (commands and their arguments) and is not used by the completion +system itself, but has a function handling completion for it. ) findex(_correct) item(tt(_correct))( -- cgit 1.4.1