summary refs log tree commit diff
path: root/Doc/Zsh/contrib.yo
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2008-05-17 22:42:16 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2008-05-17 22:42:16 +0000
commitc894f695cc02f16af429c7506bb78354dcd9a1e3 (patch)
tree315daebee1a9ebc507790baf516863b0ff450f66 /Doc/Zsh/contrib.yo
parentadeceae8bfb6ed0a3fdea87cc4483c4d990f83fe (diff)
downloadzsh-c894f695cc02f16af429c7506bb78354dcd9a1e3.tar.gz
zsh-c894f695cc02f16af429c7506bb78354dcd9a1e3.tar.xz
zsh-c894f695cc02f16af429c7506bb78354dcd9a1e3.zip
25095: thorough modernization of prompt theme system
Diffstat (limited to 'Doc/Zsh/contrib.yo')
-rw-r--r--Doc/Zsh/contrib.yo31
1 files changed, 31 insertions, 0 deletions
diff --git a/Doc/Zsh/contrib.yo b/Doc/Zsh/contrib.yo
index d3dc2ac1e..1c8b2f92c 100644
--- a/Doc/Zsh/contrib.yo
+++ b/Doc/Zsh/contrib.yo
@@ -285,6 +285,37 @@ any prefix, even a single letter; thus tt(a) is the same as tt(aliases),
 tt(z) is the same as tt(zstyles), etc.
 enditem()
 
+subsect(Manipulating Hook Functions)
+cindex(hook function utility)
+
+startitem()
+findex(add-zsh-hook)
+item(tt(add-zsh-hook) [-dD] var(hook) var(function))(
+Several functions are special to the shell, as described in the section
+ifnzman(Special Functions, noderef(Functions))\
+ifzman(SPECIAL FUNCTIONS, see zmanref(zshmisc)),
+in that they are automatic called at a specific point during shell execution.
+Each has an associated array consisting of names of functions to be
+called at the same point; these are so-called `hook functions'.
+The shell function tt(add-zsh-hook) provides a simple way of adding or
+removing functions from the array.
+
+var(hook) is one of tt(chpwd), tt(periodic), tt(precmd) or tt(preexec),
+the special functions in question.
+
+var(functions) is name of an ordinary shell function.  If no options
+are given this will be added to the array of functions to be executed.
+in the given context.
+
+If the option tt(-d) is given, the var(function) is removed from
+the array of functions to be executed.
+
+If the option tt(-D) is given, the var(function) is treated as a pattern
+and any matching names of functions are removed from the array of
+functions to be executed.
+)
+enditem()
+
 texinode(Prompt Themes)(ZLE Functions)(Utilities)(User Contributions)
 sect(Prompt Themes)