From 0be0ff565aeb9d79d85b9db593f5ffef445cef35 Mon Sep 17 00:00:00 2001 From: Kaleb Elwert Date: Wed, 8 Mar 2017 11:22:39 -0800 Subject: [PATCH] Set ZPREZTODIR to ${0:h} --- init.zsh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/init.zsh b/init.zsh index b425b62a..2ce20890 100644 --- a/init.zsh +++ b/init.zsh @@ -86,8 +86,11 @@ function pmodload { # Prezto Initialization # -# Find the dir Prezto is installed to -ZPREZTODIR=${ZPREZTODIR:-${ZDOTDIR:-$HOME}/.zprezto} +# This finds the directory prezto is installed to so plugin managers don't need +# to rely on dirty hacks to force prezto into a directory. Additionally, it +# needs to be done here because inside the pmodload function ${0:h} evaluates to +# the current directory of the shell rather than the prezto dir. +ZPREZTODIR=${0:h} # Source the Prezto configuration file. if [[ -s "${ZDOTDIR:-$HOME}/.zpreztorc" ]]; then