Add static version of add-zsh-hook
authorFrank Terbeck <ft@grml.org>
Fri, 5 Jun 2015 23:09:41 +0000 (01:09 +0200)
committerFrank Terbeck <ft@grml.org>
Fri, 5 Jun 2015 23:09:41 +0000 (01:09 +0200)
commitc4db6d7ae04cad5b87d1b6a1e0f79bf09ad5794e
tree1f1c4a88b0a274ba69ad9f62c97345e95ff80017
parent46c2d1057e37452ce9d7af2ef8efce15806d07be
Add static version of add-zsh-hook

This adds a static version of the ‘add-zsh-hook’ function from zsh
upstream. It is included for now to make the setup work with older
versions of zsh (prior to 4.3.7) in which this function had a bug that
triggers annoying errors during shell startup.

This is exactly upstreams code from f0068edb4888a4d8fe94def, with just a
few adjustments in coding style to make the function look more compact.
This definition can be removed as soon as we raise the minimum version
requirement to 4.3.7 or newer.
etc/zsh/zshrc