From: Simon Ruderich Date: Thu, 8 Oct 2009 01:37:19 +0000 (+0200) Subject: zsh: Also work when .zsh/functions is not available. X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;h=37b4c318c94cecf19d21869474c42917e9b5fb8e;p=config%2Fdotfiles.git zsh: Also work when .zsh/functions is not available. --- diff --git a/zsh/rc b/zsh/rc index 4290923..5336a6d 100644 --- 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.