From: Joerg Jaspert Date: Fri, 20 Dec 2013 22:41:21 +0000 (+0100) Subject: Define is435, autoload add-zsh-hook X-Git-Url: https://git.ganneff.de//index.cgi?p=zsh.git;a=commitdiff_plain;h=c0269255f72b859795b450dea38ce06da8a1ce6a;ds=sidebyside Define is435, autoload add-zsh-hook --- diff --git a/.zsh/functions/prompt_ganneff_setup b/.zsh/functions/prompt_ganneff_setup index 6fdf578..a6efe40 100644 --- a/.zsh/functions/prompt_ganneff_setup +++ b/.zsh/functions/prompt_ganneff_setup @@ -642,10 +642,18 @@ prompt_ganneff_battery() { fi } +is435(){ + [[ $ZSH_VERSION == 4.3.<5->* || $ZSH_VERSION == 4.<4->* \ + || $ZSH_VERSION == <5->* ]] && return 0 + return 1 +} + is439(){ [[ $ZSH_VERSION == 4.3.<9->* || $ZSH_VERSION == 4.<4->* \ || $ZSH_VERSION == <5->* ]] && return 0 return 1 } +# Ensure the add-zsh-hook function is available +is435 && autoload -Uz add-zsh-hook prompt_ganneff_setup "$@"