zshrc: autoloading is-at-least again
authorFrank Terbeck <ft@grml.org>
Sat, 2 Feb 2008 09:52:40 +0000 (10:52 +0100)
committerFrank Terbeck <ft@grml.org>
Sat, 2 Feb 2008 09:52:40 +0000 (10:52 +0100)
is-at-least() can be used for precise version checks (as opposed to our
broad is4(), is4{1,2,3}() functions - which are a lot simpler).

Note that this test will *always* fail, if the is-at-least function could
not be marked for autoloading.

etc/zsh/zshrc

index c752a63..bcddaf6 100644 (file)
@@ -289,6 +289,11 @@ is43(){
     return 1
 }
 
+# Use is-at-least, if you need to check more precisely.
+# Note that this test will *always* fail, if the is-at-least
+# function could not be marked for autoloading.
+zrcautoload is-at-least || is-at-least() { return 1 }
+
 #f1# Checks whether or not you're running grml
 isgrml(){
     [[ -f /etc/grml_version ]] && return 0