From c9afbeabfe0b8d683411b13f787a0a909bbffa25 Mon Sep 17 00:00:00 2001 From: "github.token" Date: Fri, 9 Mar 2012 15:29:10 -0500 Subject: [PATCH] Fix for add-zsh-hook function definition file not found --- lib/termsupport.zsh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/termsupport.zsh b/lib/termsupport.zsh index 221989502..777d8a64b 100644 --- a/lib/termsupport.zsh +++ b/lib/termsupport.zsh @@ -28,6 +28,10 @@ function omz_termsupport_preexec { title "$CMD" "%100>...>$2%<<" } -autoload -U add-zsh-hook -add-zsh-hook precmd omz_termsupport_precmd -add-zsh-hook preexec omz_termsupport_preexec +#autoload -U add-zsh-hook +#add-zsh-hook precmd omz_termsupport_precmd +#add-zsh-hook preexec omz_termsupport_preexec +## Fix for zsh hook compatibility issues +if [ -f "/usr/share/zsh/functions/Zle/add-zsh-hook" ] ; then + autoload -U add-zsh-hook && add-zsh-hook precmd omz_termsupport_precmd && add-zsh-hook preexec omz_termsupport_preexec +fi