in case the user doesn't symlink but copy the zshenv.home file,
authorJoerg Jaspert <joerg@ganneff.de>
Wed, 3 Apr 2013 13:21:32 +0000 (15:21 +0200)
committerJoerg Jaspert <joerg@ganneff.de>
Wed, 3 Apr 2013 13:21:32 +0000 (15:21 +0200)
deal with it and fallback to traditional definition where ZDOTDIR
is

.zsh/zshenv.home

index e49f9fd..1ed87a0 100644 (file)
@@ -18,6 +18,11 @@ else
     zp="${HOME}/.zsh"
 fi
 ZDOTDIR=${ZDOTDIR:-$zp}
+# In case the user did not symlink us, but copy, we fallback to
+# the traditional way too.
+if [[ ${HOME} == ${ZDOTDIR} ]]; then
+    ZDOTDIR="${HOME}/.zsh"
+fi
 
 [ -r "${ZDOTDIR}/zshenv" ] && source "${ZDOTDIR}/zshenv"