summaryrefslogtreecommitdiff
path: root/zshrc
diff options
context:
space:
mode:
authorTill Höppner2018-04-22 11:05:00 +0200
committerTill Höppner2018-04-22 11:05:00 +0200
commit998dc8d13c538ff42b47e2fcc1a0c2943c08dc4c (patch)
treea314b4d676abfb1fa922e1552974c49e563729dc /zshrc
parentf86b963120c8b09c00508bf1a0d787fa7d1888eb (diff)
downloadzsh-998dc8d13c538ff42b47e2fcc1a0c2943c08dc4c.tar.gz
zsh-998dc8d13c538ff42b47e2fcc1a0c2943c08dc4c.tar.xz
zsh-998dc8d13c538ff42b47e2fcc1a0c2943c08dc4c.zip
Update dependencies, stop relying on linkage to ~/.zshrc
Diffstat (limited to 'zshrc')
-rw-r--r--zshrc7
1 files changed, 6 insertions, 1 deletions
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