From 37b4c318c94cecf19d21869474c42917e9b5fb8e Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Thu, 8 Oct 2009 03:37:19 +0200 Subject: [PATCH] zsh: Also work when .zsh/functions is not available. --- zsh/rc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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. -- 2.44.2