fix(zinit-install): simplify protocol pattern (#645)

Signed-off-by: Vladislav Doster <mvdoster@gmail.com>
This commit is contained in:
vladislav doster 2024-03-20 01:18:37 -05:00 committed by GitHub
parent 7094330387
commit e8c3205a2f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -414,7 +414,7 @@ builtin source "${ZINIT[BIN_DIR]}/zinit-side.zsh" || {
) || return $?
} elif [[ $tpe = github ]] {
case ${ICE[proto]} in
(|https|git|http|ftp|ftps|rsync|ssh)
(|ftp(|s)|git|http(|s)|rsync|ssh)
:zinit-git-clone() {
command git clone --progress ${(s: :)ICE[cloneopts]---recursive} \
${(s: :)ICE[depth]:+--depth ${ICE[depth]}} \
@ -886,8 +886,7 @@ builtin source "${ZINIT[BIN_DIR]}/zinit-side.zsh" || {
ZINIT[annex-multi-flag:pull-active]=${${${(M)update:#-u}:+${ZINIT[annex-multi-flag:pull-active]}}:-2}
(
if [[ $url = (http|https|ftp|ftps|scp)://* ]] {
# URL
if [[ $url = (ftp(|s)|http(|s)|scp)://* ]] {
(
() { setopt localoptions noautopushd; builtin cd -q "$local_dir"; } || return 4