about summary refs log tree commit diff
path: root/Doc
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2012-08-21 18:45:31 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2012-08-21 18:45:31 +0000
commit76091a6995f7a567651232e2d164f6ea91462b05 (patch)
treeb3bc5d1256fed8f73ea7372d4e1dfd13734f17be /Doc
parent6f3ff6b653ca5e6f528bc46ec6295cb6d263a9fd (diff)
downloadzsh-76091a6995f7a567651232e2d164f6ea91462b05.tar.gz
zsh-76091a6995f7a567651232e2d164f6ea91462b05.tar.xz
zsh-76091a6995f7a567651232e2d164f6ea91462b05.zip
users/17211: new recursive-files style
Diffstat (limited to 'Doc')
-rw-r--r--Doc/Zsh/compsys.yo22
1 files changed, 22 insertions, 0 deletions
diff --git a/Doc/Zsh/compsys.yo b/Doc/Zsh/compsys.yo
index 135a60a41..2787f66a7 100644
--- a/Doc/Zsh/compsys.yo
+++ b/Doc/Zsh/compsys.yo
@@ -2355,6 +2355,28 @@ found, or var(max) words have been tried.
 
 The default is to complete all words from the history at once.
 )
+kindex(recursive-files, completion style)
+item(tt(recursive-files))(
+If this style is set, its value is an array of patterns to be
+tested against `tt($PWD/)': note the trailing slash, which allows
+directories in the pattern to be delimited unambiguously by including
+slashes on both sides.  If an ordinary file completion fails
+and the word on the command line does not yet have a directory part to its
+name, the style is retrieved using the same tag as for the completion
+just attempted, then the elements tested against tt($PWD/) in turn.
+If one matches, then the shell reattempts completion by prepending the word
+on the command line with each directory in the expansion of tt(**/*(/))
+in turn.  Typically the elements of the style will be set to restrict
+the number of directories beneath the current one to a manageable
+number, for example `tt(*/.git/*)'.
+
+For example,
+
+example(zstyle ':completion:*' recursive-files '*/zsh/*')
+
+If the current directory is tt(/home/pws/zsh/Src), then
+tt(zle_tr)em(TAB) can be completed to tt(Zle/zle_tricky.c).
+)
 kindex(regular, completion style)
 item(tt(regular))(
 This style is used by the tt(_expand_alias) completer and bindable