From a2159285e80508bb682d90a71270fbddada8bd05 Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Fri, 18 Jun 1999 10:55:45 +0000 Subject: zsh-3.1.5-pws-22 --- Doc/Zsh/compsys.yo | 49 ++++++++++++++++++------------------------------- 1 file changed, 18 insertions(+), 31 deletions(-) (limited to 'Doc/Zsh/compsys.yo') diff --git a/Doc/Zsh/compsys.yo b/Doc/Zsh/compsys.yo index 94533415e..572660de3 100644 --- a/Doc/Zsh/compsys.yo +++ b/Doc/Zsh/compsys.yo @@ -51,7 +51,7 @@ sect(Initialisation) The script tt(compinstall) can be run by a user to set up the completion system for use. It will usually insert code into tt(.zshrc), although if -that is not writeable it will save it in another file and tell you that +that is not writable it will save it in another file and tell you that file's locations. Note that it is up to you to make sure that the lines added to tt(.zshrc) are actually run; you may, for example, need to move them to an earlier place in the file if tt(.zshrc) usually returns early. @@ -89,13 +89,13 @@ To speed up the running of tt(compinit), it can be made to produce a dumped configuration which will be read in on future invocations. The easiest way to do this is by adding the option tt(-d) whenever tt(compinit) is sourced. In this case the dumped file will have the same name as the sourced file, -but with tt(.dump) appended to the end, or, if that is not writeable by the +but with tt(.dump) appended to the end, or, if that is not writable by the user, the file tt(.zcompdump) in the same directory as the startup files (i.e. tt($ZDOTDIR) or tt($HOME)); alternatively, an explicit file name can be given following the tt(-d). On the next call to tt(compinit -d), the dumped file will be read instead. -The other option accepted by tt(compinit) is tt(-f var(dir)), which gives +The other option accepted by tt(compinit) is tt(-f )var(dir), which gives the directory in which tt(compinit) resides. If you source tt(compinit) by its full pathname, and the option tt(FUNCTION_ARGZERO) is set, as it is by default unless tt(zsh) is emulating tt(sh) or tt(ksh), this is unnecessary @@ -106,7 +106,7 @@ the completion functions (see below). If the number of completion files changes, tt(compinit) will recognise this and produce a new dump file. However, if the name of a function or the -arguments in the first line of a tt(#compdef) funcion (as described below) +arguments in the first line of a tt(#compdef) function (as described below) change, it is easiest to delete the dump file by hand so that the next time tt(compinit) will re-create it. @@ -153,7 +153,7 @@ var(pattern) (a standard globbing pattern). Note that only one var(pattern) may be given. ) item(tt(#compdef -k) var(style key-sequences...))( -This can be used bind special completion functions to the +This can be used to bind special completion functions to the var(key-sequences). It creates a widget behaving like the builtin widget var(style), which must be one of those that perform completion, namely tt(complete-word), tt(delete-char-or-list), tt(expand-or-complete), @@ -252,9 +252,7 @@ set of functions to try is taken from the colon-separated list in the configuration key tt(completer). For example, to use normal completion and correction if that doesn't generate any matches: -indent( -nofill(tt(compconf completer=_complete:_correct)) -) +example(compconf completer=_complete:_correct) after sourcing tt(compinit). The default value for this configuration key set up in tt(compinit) is `tt(_complete)', i.e. normally only ordinary @@ -355,9 +353,7 @@ counted. The resulting list of corrected and completed strings is then presented to the user. The intended use of this completer function is to try after the normal tt(_complete) completer by setting: -indent( -nofill(tt(compconf completer=_complete:_approximate)) -) +example(compconf completer=_complete:_approximate) This will give correcting completion if and only if normal completion doesn't yield any possible completions. When @@ -379,9 +375,7 @@ If the value for this key contains a lower- or upper-case `tt(n)', the completer function will take any numeric argument as the maximum number of errors allowed. For example, with -indent( -nofill(tt(compconf approximate_accept=2n)) -) +example(compconf approximate_accept=2n) two errors will be allowed if no numeric argument is given. However, with a numeric argument of six (as in `tt(ESC-6 TAB)'), up to six @@ -443,10 +437,8 @@ configuration parameters beginning tt(correct_) are used. For example, with: -indent(tt( -nofill(compconf completer=_complete:_correct:_approximate) -nofill(compconf correct_accept='2n!' approximate_accept=3n)) -) +example(compconf completer=_complete:_correct:_approximate +compconf correct_accept='2n!' approximate_accept=3n) correction will accept up to two errors. If a numeric argument is given, correction will not be performed, but correcting completion will be, @@ -464,7 +456,7 @@ generated by the tt(_correct) completer -- and probably more. item(tt(_match))( This completer is intended to be used after the tt(_complete) completer. It allows one to give patterns on the command line and -to complete all strings metching these patterns from the set of possible +to complete all strings matching these patterns from the set of possible completions for the context the cursor is in, without having to set the tt(GLOB_COMPLETE) option. @@ -498,9 +490,7 @@ non-empty string it should be an expression usable inside a `tt($((...)))' arithmetical expression. In this case, expansion of substitutions will be done if the expression evaluates to `tt(1)'. For example, with -indent( -nofill(tt(compconf expand_substitute='NUMERIC != 1')) -) +example(compconf expand_substitute='NUMERIC != 1') substitution will be performed only if given an explicit numeric argument other than `tt(1)', as by typing `tt(ESC 2 TAB)'. @@ -556,9 +546,7 @@ should be set to an expression usable inside a `tt($((...)))' arithmetical expression. In this case, delaying will be done if the expression evaluates to `tt(1)'. For example, with -indent( -nofill(tt(compconf list_condition='NUMERIC != 1')) -) +example(compconf list_condition='NUMERIC != 1') delaying will be done only if given an explicit numeric argument other than `tt(1)'. @@ -614,6 +602,7 @@ continues with the existing list of completions. If this key is set to tt(never), however, a new completion is started if the old list was generated by a different completion command (the behaviour without the tt(_oldlist) completer). + For example, suppose you type tt(^Xc) to generate a list of corrections, and menu completion is started in one of the usual ways. Usually, typing tt(TAB) at this point would start trying to complete the line as it now @@ -704,7 +693,7 @@ over which filenames should be ignored as done by the tt(fignore) parameter in normal completion. The function tt(_files) calls tt(_path_files) with all the arguments -it was passed and, if that generated no matches, call tt(_path_files) again +it was passed and, if that generated no matches, calls tt(_path_files) again without any tt(-g) or tt(-/) option, thus generating all filenames. These functions also accept the `tt(-J)', `tt(-V)', `tt(-X)', `tt(-P)', @@ -764,11 +753,9 @@ not start with a square bracket or parenthesis, it should be the name of a command (probably with arguments) that should be invoked to complete after the equal sign. Example: -indent( -nofill(tt(_long_options '*\*' '(yes no)' \)) -nofill(tt( '*=FILE*' '_files' \)) -nofill(tt( '*=DIR*' '_files -/')) -) +example(_long_options '*\*' '(yes no)' \ + '*=FILE*' '_files' \ + '*=DIR*' '_files -/') Here, `tt(yes)' and `tt(no)' will be completed as the argument of options whose description ends in a star, file names for options that -- cgit 1.4.1