2 # zshrc/99_hookfunctions
4 # define hook functions in case the *_functions arrays are not honoured
6 # Copyright © 1994–2008 martin f. krafft <madduck@madduck.net>
7 # Released under the terms of the Artistic Licence 2.0
9 # Source repository: git://git.madduck.net/etc/zsh.git
12 autoload -U is-at-least
13 if ! is-at-least 4.3.6; then
14 for i in precmd preexec chpwd periodic; do
15 if [ -n "$functions[$i]" ]; then
16 warn "$i function already defined"
19 eval "${i}() { for fn (\$${i}_functions) \$fn \"\$@\" }"