From b3f054a04c0a4f2c274b1db2b9cb23099c18c0bd Mon Sep 17 00:00:00 2001 From: Frank Terbeck Date: Fri, 1 Feb 2008 01:28:59 +0100 Subject: [PATCH] zshrc: Don't use is-at-least anymore While this can be a useful function, it really is a little overkill for out purposes; especially, since we provide much simpler fallback functions, when it is not available. added is43() as well, which is currently not used, but probably should. :-) --- etc/zsh/zshrc | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index 671e7c1..1e799c6 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -247,20 +247,25 @@ unset xof # {{{ check for version/system # check for versions (compatibility reasons) -if autoload is-at-least && is-at-least 2>/dev/null ; then - is4() { is-at-least 4 } - is41() { is-at-least 4.1 } - is42() { is-at-least 4.2 } -else - is4(){ - [[ $ZSH_VERSION == 4.* ]] && return 0 - return 1 - } - is42(){ - [[ $ZSH_VERSION == 4.<2->* ]] && return 0 - return 1 - } -fi +is4(){ + [[ $ZSH_VERSION == <4->* ]] && return 0 + return 1 +} + +is41(){ + [[ $ZSH_VERSION == 4.<1->* || $ZSH_VERSION == <5->* ]] && return 0 + return 1 +} + +is42(){ + [[ $ZSH_VERSION == 4.<2->* || $ZSH_VERSION == <5->* ]] && return 0 + return 1 +} + +is43(){ + [[ $ZSH_VERSION == 4.<3->* || $ZSH_VERSION == <5->* ]] && return 0 + return 1 +} #f1# Checks whether or not you're running grml isgrml(){ -- 2.1.4