summaryrefslogtreecommitdiff
path: root/plugins/z/z.plugin.zsh
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/z/z.plugin.zsh')
-rw-r--r--plugins/z/z.plugin.zsh5
1 files changed, 5 insertions, 0 deletions
diff --git a/plugins/z/z.plugin.zsh b/plugins/z/z.plugin.zsh
index 96abee890..7d3eacac0 100644
--- a/plugins/z/z.plugin.zsh
+++ b/plugins/z/z.plugin.zsh
@@ -1 +1,6 @@
+# Handle $0 according to the standard:
+# https://zdharma-continuum.github.io/Zsh-100-Commits-Club/Zsh-Plugin-Standard.html
+0="${${ZERO:-${0:#$ZSH_ARGZERO}}:-${(%):-%N}}"
+0="${${(M)0:#/*}:-$PWD/$0}"
+
source "${0:h}/z.sh"