mirror of
https://github.com/zsh-users/zsh-autosuggestions.git
synced 2025-12-08 15:32:31 +01:00
feat: standardized handling $0
For all kinds of plugin managers to get the plugin’s location properly, we need to handle `$0` correctly.
This commit is contained in:
parent
a411ef3e09
commit
844304b2cd
1 changed files with 6 additions and 1 deletions
|
|
@ -1 +1,6 @@
|
||||||
source ${0:A:h}/zsh-autosuggestions.zsh
|
# According to the standard:
|
||||||
|
# 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}"
|
||||||
|
|
||||||
|
source ${0:h}/zsh-autosuggestions.zsh
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue