mirror of
https://github.com/zdharma-continuum/zinit.git
synced 2026-09-10 07:36:38 -04:00
Fix an autoload'' bug that prevented it from working on id-as'…' plugins.
This commit is contained in:
parent
a4ea80e06f
commit
64c8f4e0f0
10
zinit.zsh
10
zinit.zsh
|
|
@ -219,16 +219,18 @@ builtin setopt noaliases
|
|||
:zinit-shade-autoload () {
|
||||
emulate -LR zsh
|
||||
builtin setopt extendedglob warncreateglobal typesetsilent rcquotes
|
||||
local -a opts opts2 custom
|
||||
local -a opts opts2 custom reply
|
||||
local func
|
||||
|
||||
zparseopts -D -E -M -a opts ${(s::):-RTUXdkmrtWzwC} I+=opts2 S+:=custom
|
||||
|
||||
set -- ${@:#--}
|
||||
|
||||
[[ $ZINIT[CUR_USR] = % ]] && \
|
||||
local PLUGIN_DIR="$ZINIT[CUR_PLUGIN]" || \
|
||||
local PLUGIN_DIR="${ZINIT[PLUGINS_DIR]}/${${ZINIT[CUR_USR]}:+${ZINIT[CUR_USR]}---}${ZINIT[CUR_PLUGIN]//\//---}"
|
||||
# Process the id-as''/teleid'' to get the plugin dir.
|
||||
.zinit-any-to-user-plugin $ZINIT[CUR_USPL2]
|
||||
[[ $reply[1] = % ]] && \
|
||||
local PLUGIN_DIR="$reply[2]" || \
|
||||
local PLUGIN_DIR="$ZINIT[PLUGINS_DIR]/${reply[1]:+$reply[1]---}${reply[2]//\//---}"
|
||||
|
||||
if (( ${+opts[(r)-X]} )); then
|
||||
.zinit-add-report "${ZINIT[CUR_USPL2]}" "Warning: Failed autoload ${(j: :)opts[@]} $*"
|
||||
|
|
|
|||
Loading…
Reference in a new issue