Make plugin compatible with zsh plugin standard

This commit is contained in:
Grigorii Horos 2020-04-16 20:27:23 +03:00
parent bc51049d99
commit c535195127
No known key found for this signature in database
GPG Key ID: 690E27A17D89A380
2 changed files with 10 additions and 1 deletions

1
functions Symbolic link
View File

@ -0,0 +1 @@
src

View File

@ -1 +1,9 @@
fpath+="${0:h}/src" # Standarized $0 handling, following:
# https://github.com/zdharma/Zsh-100-Commits-Club/blob/master/Zsh-Plugin-Standard.adoc
0="${${ZERO:-${0:#$ZSH_ARGZERO}}:-${(%):-%N}}"
0="${${(M)0:#/*}:-$PWD/$0}"
if [[ $PMSPEC != *f* ]] {
fpath+=( "${0:h}/functions" )
}