diff options
Diffstat (limited to 'Doc/Zsh/compsys.yo')
-rw-r--r-- | Doc/Zsh/compsys.yo | 36 |
1 files changed, 21 insertions, 15 deletions
diff --git a/Doc/Zsh/compsys.yo b/Doc/Zsh/compsys.yo index 89e5078bc..bf2cb116e 100644 --- a/Doc/Zsh/compsys.yo +++ b/Doc/Zsh/compsys.yo @@ -481,12 +481,12 @@ functions in the tt(Widget) directory of the distribution to the name of that function, often in an abbreviated form. ) itemiz(\ -The var(completer) currently active, the name of the function -without the leading underscore. A `completer' is in -overall control of how completion is to be performed; `tt(complete)' -is the simplest, but other completers exist to perform -related tasks such as correction, or to modify the behaviour of a -later completer. See +The var(completer) currently active, the name of the function without the +leading underscore and with other underscores converted to hyphens. A +`completer' is in overall control of how completion is to be performed; +`tt(complete)' is the simplest, but other completers exist to perform +related tasks such as correction, or to modify the behaviour of a later +completer. See ifzman(the section `Control Functions' below)\ ifnzman(noderef(Control Functions)) for more information. @@ -748,7 +748,7 @@ for file system types (e.g. for the tt(mount) command) ) kindex(functions, completion tag) item(tt(functions))( -names of functions --- normally shell functions, although certain +names of functions DASH()- normally shell functions, although certain commands may understand other kinds of function ) kindex(globbed-files, completion tag) @@ -1303,9 +1303,9 @@ object file: example(zstyle ':completion:*:*:rm:*' file-patterns \ '*.o:object-files' '%p:all-files') -To alter the default behaviour of file completion --- offer files +To alter the default behaviour of file completion DASH()- offer files matching a pattern and directories on the first attempt, then all files ---- to offer only matching files on the first attempt, then directories, +DASH()- to offer only matching files on the first attempt, then directories, and finally all files: example(zstyle ':completion:*' file-patterns \ @@ -2027,7 +2027,7 @@ example(zstyle ':completion:*:complete:dpkg:option--status-1:*' \ packageset avail) causes available packages, rather than only installed packages, -to be completed for `dpkg --status'. +to be completed for `tt(dpkg -)tt(-status)'. ) kindex(path, completion style) item(tt(path))( @@ -2692,7 +2692,7 @@ This completer function is intended to be used without the tt(_approximate) completer or, as in the example, just before it. Using it after the tt(_approximate) completer is useless since tt(_approximate) will at least generate the corrected strings -generated by the tt(_correct) completer -- and probably more. +generated by the tt(_correct) completer DASH()- and probably more. ) findex(_expand) item(tt(_expand))( @@ -2818,7 +2818,7 @@ to the tt(expand-or-complete-prefix) command. The tt(completer) style is used to decide which other completers are to be called to generate matches. If this style is unset, the list of -completers set for the current context is used -- except, of course, the +completers set for the current context is used DASH()- except, of course, the tt(_prefix) completer itself. Furthermore, if this completer appears more than once in the list of completers only those completers not already tried by the last invocation of tt(_prefix) will be called. @@ -2939,6 +2939,12 @@ menu selection: example(zle -C foo complete-word _generic bindkey '...' foo zstyle ':completion:foo:*' menu yes select=1) + +Note in particular that the tt(completer) style may be set for the context +in order to change the set of functions used to generate possible matches. +If tt(_generic) is called with arguments, those are passed through to +tt(_main_complete) as the list of completers in place of those defined by +the tt(completer) style. ) findex(_history_complete_word (\e/)) item(tt(_history_complete_word) (\e/))( @@ -3505,7 +3511,7 @@ example(local curcontext="$curcontext") This is useful where it is not possible for multiple states to be valid together. -The option `tt(--)' allows tt(_arguments) to work out the names of long +The option `tt(-)tt(-)' allows tt(_arguments) to work out the names of long options that support the `tt(-)tt(-help)' option which is standard in many GNU commands. The command word is called with the argument `tt(-)tt(-help)' and the output examined for option names. Clearly, it can @@ -3537,7 +3543,7 @@ of these patterns. A typical help text which uses this feature is: example( -C, --directory=DIR change to directory DIR) so that the above specifications will cause directories to be completed -after `tt(--directory)', though not after `tt(-C)'. +after `tt(-)tt(-directory)', though not after `tt(-C)'. Note also that tt(_arguments) tries to find out automatically if the argument for an option is optional. This can be specified explicitly by @@ -4406,7 +4412,7 @@ some attempt is made to decide which version of a command is present. For example, completion for the tt(mount) command tries to determine the system it is running on, while completion for many other utilities try to decide whether the GNU version of the command is in use, and hence whether the -tt(--help) option is supported. +tt(-)tt(-help) option is supported. ) item(tt(X), tt(AIX), tt(BSD), ...)( Completion and utility function for commands available only on some systems. |