]> ruderich.org/simon Gitweb - config/dotfiles.git/commitdiff
zsh: Also work when .zsh/functions is not available.
authorSimon Ruderich <simon@ruderich.org>
Thu, 8 Oct 2009 01:37:19 +0000 (03:37 +0200)
committerSimon Ruderich <simon@ruderich.org>
Thu, 8 Oct 2009 01:37:19 +0000 (03:37 +0200)
zsh/rc

diff --git a/zsh/rc b/zsh/rc
index 429092368f287ef9e066b70d1097732d500bd94c..5336a6deffadbf31b281f91fa66ffa6a6615be70 100644 (file)
--- a/zsh/rc
+++ b/zsh/rc
@@ -47,7 +47,9 @@ fi
 fpath=(~/.zsh/functions $fpath)
 # Autoload my functions (except completion functions and hidden files). Thanks
 # to caphuso from the Zsh example files for this idea.
-autoload ${fpath[1]}/^_*(^/:t)
+if [[ -d ~/.zsh/functions ]]; then
+    autoload ${fpath[1]}/^_*(^/:t)
+fi
 
 # Simulate hooks using _functions arrays for Zsh versions older than 4.3.4. At
 # the moment only precmd() and preexec() are simulated.