浏览代码

z plugin: fix loading from custom location

The old implementation would attempt to load both the default and custom
implementations, with the custom one coming first, so it would get clobbered
by the default version.
Andrew Janke 9 年之前
父节点
当前提交
2205aa42aa
共有 1 个文件被更改,包括 1 次插入6 次删除
  1. 1 6
      plugins/z/z.plugin.zsh

+ 1 - 6
plugins/z/z.plugin.zsh

@@ -1,6 +1 @@
-_load_z() {
-  source $1/z.sh
-}
-
-[[ -f $ZSH_CUSTOM/plugins/z/z.plugin.zsh ]] && _load_z $ZSH_CUSTOM/plugins/z
-[[ -f $ZSH/plugins/z/z.plugin.zsh ]] && _load_z $ZSH/plugins/z
+source "${0:h}/z.sh"