about summary refs log tree commit diff
path: root/Doc/Zsh
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2000-06-13 11:55:06 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2000-06-13 11:55:06 +0000
commitbde4cfde51526bb8910c1dfbce8b6e4c4e1f5149 (patch)
tree0875c7bda2fc868f48da66104d403e5d5e9514a0 /Doc/Zsh
parenta707108a7544b9c2e5bd99cf51a4c5ba08558ade (diff)
downloadzsh-bde4cfde51526bb8910c1dfbce8b6e4c4e1f5149.tar.gz
zsh-bde4cfde51526bb8910c1dfbce8b6e4c4e1f5149.tar.xz
zsh-bde4cfde51526bb8910c1dfbce8b6e4c4e1f5149.zip
new _generic widget to call completion with $WIDGET in function field of context (?)
Diffstat (limited to 'Doc/Zsh')
-rw-r--r--Doc/Zsh/compsys.yo14
1 files changed, 14 insertions, 0 deletions
diff --git a/Doc/Zsh/compsys.yo b/Doc/Zsh/compsys.yo
index f23f993fd..5167c626b 100644
--- a/Doc/Zsh/compsys.yo
+++ b/Doc/Zsh/compsys.yo
@@ -2452,6 +2452,20 @@ Unlike tt(_expand) this uses a `tt(1)' (one) as the default
 value for the tt(substitute) and tt(glob) styles, so both types of
 expansion will normally be performed.
 )
+findex(_generic)
+item(tt(_generic))(
+This function is not defined as a widget and not bound by
+default. However, it can be used to define a widget and will then
+store the name of the widget in the var(function) field of the context 
+and call the completion system. This allows to easily define custom
+completion widgets with their own sets of style settings. For example, 
+to define a widget that does normal completion and starts
+menu-selection, one could do:
+
+example(zle -C foo complete-word _generic
+bindkey '...' foo
+zstyle ':completion:foo:*' menu yes select=1)
+)
 findex(_history_complete_word) (\e/))
 item(tt(_history_complete_word) (\e/))(
 Complete words from the shell's command history. This uses the