refactor: rename .zinit- to -zinit-

This commit is contained in:
Vladislav Doster 2022-12-07 00:22:28 -05:00
parent f4cbf42374
commit 16355dce0c

View file

@ -5,7 +5,7 @@ setopt extendedglob warncreateglobal typesetsilent noshortloops
local type="$1" user="$2" plugin="$3" id_as="$4" dir="$5" || \
local type="$1" url="$2" id_as="$3" dir="$4"
# FUNCTION: .zinit-annex-patch-dl-download-file-stdout {{{
# FUNCTION: _zi::-annex-patch-dl-download-file-stdout {{{
# Downloads file to stdout. Supports following backend commands:
# curl, wget, lftp, lynx. Used by snippet loading.
.zinit-annex-patch-dl-download-file-stdout() {
@ -39,7 +39,7 @@ setopt extendedglob warncreateglobal typesetsilent noshortloops
elif type lftp 2>/dev/null 1>&2; then
command lftp -c "cat $url" || return 1
else
.zinit-annex-patch-dl-download-file-stdout "$url" "1"
_zi::-annex-patch-dl-download-file-stdout "$url" "1"
return $?
fi
fi
@ -74,8 +74,8 @@ if [[ -n ${ICE[dl]} && ${ICE[dl]} != ink=[-/[:alnum:]]* ]] {
local ret=0
.zinit-annex-patch-dl-download-file-stdout "${srcdst[1]}" >! "$tdir/$tl" || {
.zinit-annex-patch-dl-download-file-stdout "${srcdst[1]}" 1 >! "$tdir/$tl" || {
_zi::-annex-patch-dl-download-file-stdout "${srcdst[1]}" >! "$tdir/$tl" || {
_zi::-annex-patch-dl-download-file-stdout "${srcdst[1]}" 1 >! "$tdir/$tl" || {
print -P -- "%F{38}patch-dl annex: %F{160}Couldn't download" \
"the url %F{220}${srcdst[1]}%f"
ret=1