summaryrefslogtreecommitdiff
path: root/plugins/macos/macos.plugin.zsh
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/macos/macos.plugin.zsh')
-rw-r--r--plugins/macos/macos.plugin.zsh5
1 files changed, 5 insertions, 0 deletions
diff --git a/plugins/macos/macos.plugin.zsh b/plugins/macos/macos.plugin.zsh
index 6a91be336..b540eecb5 100644
--- a/plugins/macos/macos.plugin.zsh
+++ b/plugins/macos/macos.plugin.zsh
@@ -1,3 +1,8 @@
+# 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}"
+
# Open the current directory in a Finder window
alias ofd='open_command $PWD'