Browse Source

Fix incompability between some external modules and zsh <= 4.3.6

Emmanuel Bouthenot 12 years ago
parent
commit
d8df5290a1
1 changed files with 8 additions and 5 deletions
  1. 8 5
      .zsh.d/zshrc

+ 8 - 5
.zsh.d/zshrc

@@ -47,11 +47,14 @@ for f in $DOTZSHDIR/config.d/*.zsh ; do
 done
 
 # sourcing externals plugins
-for d in $DOTZSHDIR/externals.d/*; do
-    if [ -f "$d/${d##*/}.zsh" ]; then
-        source "$d/${d##*/}.zsh"
-    fi
-done
+# some features are not well supported by zsh <= 4.3.6
+if [ "$(printf "%02d%02d%02d" $(echo ${ZSH_VERSION:gs/./ /}))" -gt "040306" ]; then
+    for d in $DOTZSHDIR/externals.d/*; do
+        if [ -f "$d/${d##*/}.zsh" ]; then
+            source "$d/${d##*/}.zsh"
+        fi
+    done
+fi
 
 # using 'sudo zsh'
 if [ "$SUDO_USER" -a "$UID" = 0 ]; then