From b9c58a73ac2eace89340b268db852c8a158bd707 Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Sun, 1 Apr 2001 16:19:15 +0000 Subject: various doc fixes and minor completion function changes, most of which are to use the -A "-*" and -S options to _arguments (13863) --- Doc/Zsh/compsys.yo | 45 ++++++++++++++++++++++++--------------------- 1 file changed, 24 insertions(+), 21 deletions(-) (limited to 'Doc/Zsh/compsys.yo') diff --git a/Doc/Zsh/compsys.yo b/Doc/Zsh/compsys.yo index f2e8f6bd3..85e1118f0 100644 --- a/Doc/Zsh/compsys.yo +++ b/Doc/Zsh/compsys.yo @@ -486,7 +486,7 @@ example(zstyle -e ':completion:*' completer ' One should be careful not to use too complicated code with this option, at least for the styles that are looked up quite often. These are basically those that define some global completion behaviour but -allow that to be different for all matches or groups as matches (such +allow that to be different for all matches or groups of matches (such as the tt(menu) and tt(list-rows-first) styles). Alternatively one can always use a less general pattern for the context than in the example above and use a second call to tt(zstyle) with a generic @@ -760,7 +760,7 @@ for communication ports ) kindex(prefixes, completion tag) item(tt(prefixes))( -for prefixes (like those of an URL) +for prefixes (like those of a URL) ) kindex(printers, completion tag) item(tt(printers))( @@ -942,8 +942,8 @@ with all matches will almost never be wanted. kindex(cache-path, completion style) item(tt(cache-path))( This style defines the path where any cache files containing dumped -completion data are stored. Defaults to `tt($DOTDIR/.zcompcache)', or -`tt($HOME/.zcompcache)' if tt($DOTDIR) is not defined. The completion +completion data are stored. Defaults to `tt($ZDOTDIR/.zcompcache)', or +`tt($HOME/.zcompcache)' if tt($ZDOTDIR) is not defined. The completion layer will not be used unless the tt(use-cache) style is set. ) kindex(call-command, completion style) @@ -980,8 +980,8 @@ process IDs to complete. Note that the completion function generally has to call the command everytime it is called. Because of that care should be taken to -specify only commands that take only a short time to run (and that -will eventually stop at all). +specify only commands that take a short time to run (and that will +eventually stop at all). ) kindex(commands, completion style) item(tt(commands))( @@ -1086,6 +1086,8 @@ such files really exist. This can be useful on systems that support special filesystems whose top-level pathnames can not be listed or generated with glob patterns. +It can also be used for directories for which one does not have read +permission. ) kindex(fake-parameters, completion style) item(tt(fake-parameters))( @@ -1197,24 +1199,24 @@ what these matches are. This string may also contain the sequences to specify output attributes, such as `tt(%B)', `tt(%S)' and `tt(%{)...tt(%})'. -For the same purpose, this style is also tested with the tags used -when matches are generated before it is tested for the -tt(descriptions) tag. This gives the possibility to define different -format strings for different types of matches. +For the same purpose, this style is also tested with the tags used when +matches are generated before it is tested for the tt(descriptions) +tag. This provides the possibility of defining different format +strings for different types of matches. Note also that some completer functions define additional `tt(%)'-sequences. These are described for the completer functions that make use of them. -For the tt(messages) tag, this defines a string used by some +For the tt(messages) tag, this style defines a string used by some completion functions to display messages. Here, the `tt(%d)' is -replaced with the message given by the completion function. +replaced with a message given by the completion function. -Finally, when set with the tt(warnings) tag, the format string is printed -when no matches could be generated at all. In this case the `tt(%d)' is -replaced with the descriptions for the matches that were expected -separated by spaces and the sequence `tt(%D)' is replaced with those -descriptions separated by newlines. +Finally, when set with the tt(warnings) tag, the format string is +printed when no matches could be generated at all. In this case the +`tt(%d)' is replaced with the descriptions for the matches that were +expected separated by spaces and the sequence `tt(%D)' is replaced with +those descriptions separated by newlines. The `tt(%)' for the sequences that are replaced by strings provided by the completion functions like the `tt(%d)' may be followed by field @@ -2308,13 +2310,14 @@ limit on the number of errors set by the tt(max-errors) style. Hence on the first try the completer field of the context contains `tt(approximate-1)', on the second try `tt(approximate-2)', and so on. -When tt(_approximate) is called from another function, the number of errors -to accept may be given with the tt(-a) option. Its argument should be -the same as the value of the tt(max-errors) style, all in one string. +When tt(_approximate) is called from another function, the number of +errors to accept may be given with the tt(-a) option. Its argument +should be the same as the value of the tt(max-errors) style, all in one +string. Note that this completer (and the tt(_correct) completer mentioned below) can be quite expensive to call, especially when a large number -of errors is allowed. One way to avoid this is to set up the +of errors are allowed. One way to avoid this is to set up the tt(completer) style using the tt(-e) option to zstyle so that some completers are only used when completion is attempted a second time on the same string, e.g.: -- cgit 1.4.1