about summary refs log tree commit diff
path: root/Doc/Zsh/compsys.yo
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2000-08-01 07:19:15 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2000-08-01 07:19:15 +0000
commitcd2984fb66e630cd107bfa6cde0b868070aa877b (patch)
tree62231a5e478381e391d66b82c2f5d51eb5e7f935 /Doc/Zsh/compsys.yo
parent3896f72f4d4364af53a2ec3be727cf288e917949 (diff)
downloadzsh-cd2984fb66e630cd107bfa6cde0b868070aa877b.tar.gz
zsh-cd2984fb66e630cd107bfa6cde0b868070aa877b.tar.xz
zsh-cd2984fb66e630cd107bfa6cde0b868070aa877b.zip
make $compcontext more powerful and easier to use for simple cases
Diffstat (limited to 'Doc/Zsh/compsys.yo')
-rw-r--r--Doc/Zsh/compsys.yo22
1 files changed, 15 insertions, 7 deletions
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))(