]> git.donarmstrong.com Git - zsh.git/blob - .zsh/zshrc/99_hookfunctions
add ~/.local/bin to PATH
[zsh.git] / .zsh / zshrc / 99_hookfunctions
1 # -*- mode: sh -*-
2 # zshrc/99_hookfunctions
3 #
4 # define hook functions in case the *_functions arrays are not honoured
5 #
6 # Copyright © 1994–2008 martin f. krafft <madduck@madduck.net>
7 # Released under the terms of the Artistic Licence 2.0
8 #
9 # Source repository: git://git.madduck.net/etc/zsh.git
10 #
11
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"
17       continue
18     fi
19     eval "${i}() { for fn (\$${i}_functions) \$fn \"\$@\" }"
20   done
21 fi
22
23 # vim:ft=zsh