From 2a0a7b30616ef1fe820652391055df6dd4144284 Mon Sep 17 00:00:00 2001 From: Ben O'Hara Date: Sun, 17 Jun 2012 14:53:14 +1000 Subject: [PATCH] dont load the prompt module if older zsh version --- modules/prompt/init.zsh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/prompt/init.zsh b/modules/prompt/init.zsh index a92eb233..749d706f 100644 --- a/modules/prompt/init.zsh +++ b/modules/prompt/init.zsh @@ -8,6 +8,13 @@ # Load and execute the prompt theming system. autoload -Uz promptinit && promptinit +# Check for the minimum supported version. +min_zsh_version='4.3.10' +if ! autoload -Uz is-at-least || ! is-at-least "$min_zsh_version"; then + return 1 +fi +unset min_zsh_version + # Load the prompt theme. zstyle -a ':omz:module:prompt' theme 'prompt_argv' if (( $#prompt_argv > 0 )); then