diff options
author | Tanaka Akira <akr@users.sourceforge.net> | 1999-11-15 12:01:46 +0000 |
---|---|---|
committer | Tanaka Akira <akr@users.sourceforge.net> | 1999-11-15 12:01:46 +0000 |
commit | 35b2633ad941966f5fca07b625a594a5b68c0fdb (patch) | |
tree | b54740d014e594ba5d81931cdcdb3387bcf9dfca /Doc/Zsh/compsys.yo | |
parent | bb98460a01ce1f6c1e71f7e401f782c81b71486b (diff) | |
download | zsh-35b2633ad941966f5fca07b625a594a5b68c0fdb.tar.gz zsh-35b2633ad941966f5fca07b625a594a5b68c0fdb.tar.xz zsh-35b2633ad941966f5fca07b625a594a5b68c0fdb.zip |
manual/8639
Diffstat (limited to 'Doc/Zsh/compsys.yo')
-rw-r--r-- | Doc/Zsh/compsys.yo | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Doc/Zsh/compsys.yo b/Doc/Zsh/compsys.yo index e973c93e8..9e5a4cdcd 100644 --- a/Doc/Zsh/compsys.yo +++ b/Doc/Zsh/compsys.yo @@ -949,6 +949,17 @@ first description. The string will be used as the match specification when completing option names and values instead of the default `tt(r:|[_-]=* r:|=*)'. +Finally, the option tt(-C) can be given to make tt(_arguments) modify +the tt(curcontext) parameter when a action of the form +`tt(->)var(state)' is used. This parameter is used to keep track of +the current context and in this case it (and not the parameter +tt(context) as explained above) has to be made local to make sure that +calling functions don't use the modified value. Also, the local +version of tt(curcontext) has to be initialised with the old value as +in: + +example(local curcontext="$curcontext") + The function can also be made to automatically complete long options for commands that support the `tt(-)tt(-help)' option as, for example, most of the GNU commands do. For this, the string `tt(-)tt(-)' must be @@ -1100,6 +1111,10 @@ typeset -A val_args) when using an action of the form `tt(->)var(string)'. With this function the tt(context) parameter will be set to the name of the value whose argument is to be completed. + +Like tt(_arguments', tt(_values) also supports the tt(-C) option in +which case you have to make the parameter tt(curcontext) local instead +of tt(context) (as described above). ) item(tt(_regex_arguments))( This function is a compiler to generate a completion function. The |