aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDennis Eriksen <d@ennis.no>2024-06-09 13:43:24 +0200
committerDennis Eriksen <d@ennis.no>2024-06-09 13:43:24 +0200
commitbaeb653231cd4c8a48b7a32d02697108775a8e68 (patch)
tree3b7592ef662c0e8c440adaf2b608f66000a7787c
parentJust use is-at-least, which comes with zsh (diff)
downloadidgatt-baeb653231cd4c8a48b7a32d02697108775a8e68.tar.gz
ZSH_ARGZERO was not available before 5.3
-rwxr-xr-xbin/bin/idgatt.zsh2
-rwxr-xr-xbin/bin/macos-setup.zsh2
2 files changed, 2 insertions, 2 deletions
diff --git a/bin/bin/idgatt.zsh b/bin/bin/idgatt.zsh
index 8b4498b..8419137 100755
--- a/bin/bin/idgatt.zsh
+++ b/bin/bin/idgatt.zsh
@@ -14,7 +14,7 @@ setopt errexit nounset # be strict
# Standardized $0 handling, according to the Zsh Plugin Standard
# https://zplugin.readthedocs.io/en/latest/zsh-plugin-standard/
-0="${${ZERO:-${0:#$ZSH_ARGZERO}}:-${(%):-%N}}"
+0="${${ZERO:-${0:#${ZSH_ARGZERO:-}}}:-${(%):-%N}}"
0="${${(M)0:#/*}:-$PWD/$0}"
# Get the absolute path to the install-script, and resolve all symlinks on the way
diff --git a/bin/bin/macos-setup.zsh b/bin/bin/macos-setup.zsh
index d4e1c6f..21b732a 100755
--- a/bin/bin/macos-setup.zsh
+++ b/bin/bin/macos-setup.zsh
@@ -25,7 +25,7 @@
### Variables ##########
#
-0="${${ZERO:-${0:#$ZSH_ARGZERO}}:-${(%):-%N}}"
+0="${${ZERO:-${0:#${ZSH_ARGZERO:-}}}:-${(%):-%N}}"
0="${${(M)0:#/*}:-$PWD/$0}"
typeset -i DEBUG=0