From 28ee5846bbac56926241fc5ef9f116161ceb6f23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= Date: Fri, 4 Sep 2020 21:50:00 +0200 Subject: [PATCH] init: define $ZSH if not defined Closes #9223 --- oh-my-zsh.sh | 3 +++ 1 file changed, 3 insertions(+) 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