Skip to content

Commit b0a068c

Browse files
authored
Update zsh-string-lib.lib.zsh
1 parent 4957680 commit b0a068c

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

zsh-string-lib.lib.zsh

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
1-
# According to the Zsh Plugin Standard:
2-
# https://github.com/z-shell/zi/wiki/Zsh-Plugin-Standard
3-
4-
0="${${ZERO:-${0:#$ZSH_ARGZERO}}:-${(%):-%N}}"
1+
# Standardized $0 Handling
2+
# https://z.digitalclouds.dev/community/zsh_plugin_standard#zero-handling
3+
0="${ZERO:-${${0:#$ZSH_ARGZERO}:-${(%):-%N}}}"
54
0="${${(M)0:#/*}:-$PWD/$0}"
65

6+
# Functions directory
7+
# https://z.digitalclouds.dev/community/zsh_plugin_standard#funtions-directory
78
if [[ $PMSPEC != *f* ]] {
8-
fpath+=( "${0:h}/functions" )
9+
fpath+=( "${0:h}/functions" )
910
}
1011

1112
zmodload zsh/system 2>/dev/null
1213

14+
# API-like functions
15+
# https://z.digitalclouds.dev/community/zsh_plugin_standard#the-proposed-function-name-prefixes
1316
autoload -Uz \
1417
@str-parse-json \
1518
@str-read-all \

0 commit comments

Comments
 (0)