summaryrefslogtreecommitdiff
path: root/oh-my-zsh.sh
diff options
context:
space:
mode:
Diffstat (limited to 'oh-my-zsh.sh')
-rw-r--r--oh-my-zsh.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/oh-my-zsh.sh b/oh-my-zsh.sh
index 5b057256d..16e244be5 100644
--- a/oh-my-zsh.sh
+++ b/oh-my-zsh.sh
@@ -1,3 +1,6 @@
+# If ZSH is not defined, use the current script's directory.
+[[ -z "$ZSH" ]] && export ZSH="${${(%):-%x}:a:h}"
+
# Set ZSH_CACHE_DIR to the path where cache files should be created
# or else we will use the default cache/
if [[ -z "$ZSH_CACHE_DIR" ]]; then