From 348c1f84b4b74d151a879fad896ed9132b98aea3 Mon Sep 17 00:00:00 2001 From: Alessandro Molari Date: Mon, 15 Dec 2014 10:09:07 +0000 Subject: [PATCH] Update init.zsh --- init.zsh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/init.zsh b/init.zsh index 6b5254fb..0b5d7c14 100644 --- a/init.zsh +++ b/init.zsh @@ -5,6 +5,15 @@ # Sorin Ionescu # +# +# Configuration +# + +# Set PREZTO_DIR to the default value if not already set +if [ -z "${PREZTO_DIR}" ]; then + PREZTO_DIR=${ZDOTDIR:-$HOME}/.zprezto +fi + # # Version Check # @@ -31,7 +40,7 @@ function pmodload { pmodules=("$argv[@]") # Add functions to $fpath. - fpath=(${pmodules:+${ZDOTDIR:-$HOME}/.zprezto/modules/${^pmodules}/functions(/FN)} $fpath) + fpath=(${pmodules:+${PREZTO_DIR}/modules/${^pmodules}/functions(/FN)} $fpath) function { local pfunction @@ -40,7 +49,7 @@ function pmodload { setopt LOCAL_OPTIONS EXTENDED_GLOB # Load Prezto functions. - for pfunction in ${ZDOTDIR:-$HOME}/.zprezto/modules/${^pmodules}/functions/$~pfunction_glob; do + for pfunction in ${PREZTO_DIR}/modules/${^pmodules}/functions/$~pfunction_glob; do autoload -Uz "$pfunction" done }