From: Frank Terbeck Date: Fri, 1 Feb 2008 00:28:59 +0000 (+0100) Subject: zshrc: Don't use is-at-least anymore X-Git-Tag: 0.3.48~5 X-Git-Url: http://git.grml.org/?a=commitdiff_plain;ds=sidebyside;h=b3f054a04c0a4f2c274b1db2b9cb23099c18c0bd;p=grml-etc-core.git 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. :-) --- 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(){