From 998dc8d13c538ff42b47e2fcc1a0c2943c08dc4c Mon Sep 17 00:00:00 2001 From: Till Höppner Date: Sun, 22 Apr 2018 11:05:00 +0200 Subject: Update dependencies, stop relying on linkage to ~/.zshrc --- zshrc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'zshrc') diff --git a/zshrc b/zshrc index 5385352..158225a 100644 --- a/zshrc +++ b/zshrc @@ -3,7 +3,12 @@ # config files and plugins located relative to this file # directory this file is in -CFG_DIR=$(dirname $(readlink -f ~/.zshrc)) +local CFG_DIR +if [ -z "$ZSH_CFG_DIR" ]; then + CFG_DIR=$(dirname $(readlink -f "${(%):-%N}")) +else + CFG_DIR="$ZSH_CFG_DIR" +fi for plugin in $CFG_DIR/plugins/*(N); do # add *.zsh if no *.plugin.zsh found -- cgit v1.2.3