mirror of
https://github.com/zsh-users/zsh-autosuggestions.git
synced 2025-04-17 11:35:31 +08:00

For all kinds of plugin managers to get the plugin’s location properly, we need to handle `$0` correctly.
7 lines
230 B
Bash
7 lines
230 B
Bash
# 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
|