From c894f695cc02f16af429c7506bb78354dcd9a1e3 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Sat, 17 May 2008 22:42:16 +0000 Subject: 25095: thorough modernization of prompt theme system --- Doc/Zsh/contrib.yo | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'Doc/Zsh/contrib.yo') 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) -- cgit 1.4.1