From 4ec01e43c15d71221d8acaebbe97ecc8057bbdb4 Mon Sep 17 00:00:00 2001 From: Vladislav Doster Date: Tue, 19 Dec 2023 20:02:02 -0600 Subject: [PATCH] fix: zip archive logic in ziextract Signed-off-by: Vladislav Doster --- tests/ices.zunit | 58 --------------------------------------------- tests/plugins.zunit | 1 - zinit-autoload.zsh | 2 +- zinit.zsh | 19 ++++----------- 4 files changed, 6 insertions(+), 74 deletions(-) delete mode 100755 tests/ices.zunit diff --git a/tests/ices.zunit b/tests/ices.zunit deleted file mode 100755 index 20ca62fb8..000000000 --- a/tests/ices.zunit +++ /dev/null @@ -1,58 +0,0 @@ -#!/usr/bin/env zunit - -# @setup { -# HOME="$zi_test_dir" -# typeset -gx ZPLUGINS="$zi_test_dir/plugins" -# } -# -# @test 'atclone' { -# run zinit as"null" id-as"test/atclone" atclone"mv readme.md atclone.md" for zdharma-continuum/null -# assert $state equals 0 -# assert "$ZPLUGINS/test---atclone/atclone.md" is_file -# assert "$ZPLUGINS/test---atclone/atclone.md" is_readable -# assert "$ZPLUGINS/test---atclone/readme.md" not_exists -# } -# @test 'completions' { -# run zinit as"null" id-as"test/completions" atclone"touch _whatever" completions for zdharma-continuum/null -# assert $state equals 0 -# assert "$ZPLUGINS/test---completions/_whatever" is_file -# assert "$zi_test_dir/completions/_whatever" is_file -# } -# @test 'completions-ignored' { -# # only the _valid file should be installed as a completion -# run zinit as"null" id-as"test/ignored_completions" atclone"touch __init__.py _valid" completions for zdharma-continuum/null -# assert $state equals 0 -# assert "$ZPLUGINS/test---ignored_completions/_valid" is_file -# assert "$ZPLUGINS/test---ignored_completions/__init__.py" is_file -# assert "$zi_test_dir/completions/_valid" is_file -# COMPS=( "$zi_test_dir/completions/_*" ) -# assert __init__.py is_not_value_in $COMPS -# } -# @test 'completions-overwrite' { -# # if both are given, the completions wins -# run zinit as"null" id-as"test/completions-overwrite" atclone"touch _whatever2" nocompletions completions for zdharma-continuum/null -# assert $state equals 0 -# assert "$ZPLUGINS/test---completions-overwrite/_whatever2" is_file -# assert "$zi_test_dir/completions/_whatever2" is_file -# } -# @test 'cp' { -# run zinit as"null" id-as"test/cp" cp"readme.md -> cp.md" for zdharma-continuum/null -# assert $state equals 0 -# assert "$ZPLUGINS/test---cp/cp.md" is_file -# assert "$ZPLUGINS/test---cp/cp.md" is_readable -# assert "$ZPLUGINS/test---cp/readme.md" is_file -# } -# # @test 'make' { -# # run zinit as"null" id-as"test/make" atclone"printf 'all:\n\ttouch whatever\n' > Makefile" make"all" for zdharma-continuum/null -# # assert $state equals 0 -# # assert "$ZPLUGINS/test---make/whatever" is_file -# # } -# @test 'mv' { -# run zinit as"null" id-as"test/mv" mv"readme.md -> mv.md" for zdharma-continuum/null -# assert $state equals 0 -# assert "$ZPLUGINS/test---mv/mv.md" is_file -# assert "$ZPLUGINS/test---mv/mv.md" is_file -# assert "$ZPLUGINS/test---mv/readme.md" not_exists -# } - -# vim:ft=zsh:sw=2:sts=2:et:foldmarker=\ {,}:foldmethod=marker diff --git a/tests/plugins.zunit b/tests/plugins.zunit index d83d99c4e..6ddf22b2a 100755 --- a/tests/plugins.zunit +++ b/tests/plugins.zunit @@ -2,7 +2,6 @@ @setup { HOME="$zi_test_dir" - # ZBIN="$zi_dir/polaris/bin" typeset -gx ZBIN="$zi_test_dir/polaris/bin" } diff --git a/zinit-autoload.zsh b/zinit-autoload.zsh index fb16a177d..4ef2f13ec 100644 --- a/zinit-autoload.zsh +++ b/zinit-autoload.zsh @@ -3088,7 +3088,7 @@ print -- "\nAvailable ice-modifiers:\n\n${ice_order[*]}" .zinit-pager & integer pager_pid=$! - { sleep 20 && kill -9 $pager_pid 2>/dev/null 1>&2; } &! + { sleep 1 && kill -9 $pager_pid 2>/dev/null 1>&2; } &! { wait $pager_pid; } > /dev/null 2>&1 local -a log diff --git a/zinit.zsh b/zinit.zsh index e4ed3d7e1..818dc332a 100644 --- a/zinit.zsh +++ b/zinit.zsh @@ -2966,7 +2966,7 @@ You can try to prepend {apo}${___q}{lhi}@{apo}'{error} to the ID if the last ice .zinit-parse-opts update "$@" builtin set -- "${reply[@]}" if [[ ${OPTS[opt_-a,--all]} -eq 1 || ${OPTS[opt_-p,--parallel]} -eq 1 || ${OPTS[opt_-s,--snippets]} -eq 1 || ${OPTS[opt_-l,--plugins]} -eq 1 || -z $1$2${ICE[teleid]}${ICE[id-as]} ]]; then - [[ -z $1$2 && $(( OPTS[opt_-a,--all] + OPTS[opt_-p,--parallel] + OPTS[opt_-s,--snippets] + OPTS[opt_-l,--plugins] )) -eq 0 ]] && { builtin print -r -- "Assuming --all is passed"; sleep 3; } + [[ -z $1$2 && $(( OPTS[opt_-a,--all] + OPTS[opt_-p,--parallel] + OPTS[opt_-s,--snippets] + OPTS[opt_-l,--plugins] )) -eq 0 ]] && { builtin print -r -- "Assuming --all is passed"; } (( OPTS[opt_-p,--parallel] )) && OPTS[value]=${1:-15} .zinit-update-or-status-all update; ___retval=$? else @@ -2977,7 +2977,7 @@ You can try to prepend {apo}${___q}{lhi}@{apo}'{error} to the ID if the last ice ;; (status) if [[ $2 = --all || ( -z $2 && -z $3 ) ]]; then - [[ -z $2 ]] && { builtin print -r -- "Assuming --all is passed"; sleep 3; } + [[ -z $2 ]] && { builtin print -r -- "Assuming --all is passed"; } .zinit-update-or-status-all status; ___retval=$? else .zinit-update-or-status status "${2%%(///|//|/)}" "${3%%(///|//|/)}"; ___retval=$? @@ -2985,7 +2985,7 @@ You can try to prepend {apo}${___q}{lhi}@{apo}'{error} to the ID if the last ice ;; (report) if [[ $2 = --all || ( -z $2 && -z $3 ) ]]; then - [[ -z $2 ]] && { builtin print -r -- "Assuming --all is passed"; sleep 4; } + [[ -z $2 ]] && { builtin print -r -- "Assuming --all is passed"; } .zinit-show-all-reports else .zinit-show-report "${2%%(///|//|/)}" "${3%%(///|//|/)}"; ___retval=$? @@ -3070,7 +3070,7 @@ You can try to prepend {apo}${___q}{lhi}@{apo}'{error} to the ID if the last ice (compile) (( ${+functions[.zinit-compile-plugin]} )) || builtin source "${ZINIT[BIN_DIR]}/zinit-install.zsh" || return 1 if [[ $2 = --all || ( -z $2 && -z $3 ) ]]; then - [[ -z $2 ]] && { builtin print -r -- "Assuming --all is passed"; sleep 3; } + [[ -z $2 ]] && { builtin print -r -- "Assuming --all is passed"; } .zinit-compile-uncompile-all 1; ___retval=$? else .zinit-compile-plugin "${2%%(///|//|/)}" "${3%%(///|//|/)}"; ___retval=$? @@ -3083,7 +3083,7 @@ You can try to prepend {apo}${___q}{lhi}@{apo}'{error} to the ID if the last ice ;; (uncompile) if [[ $2 = --all || ( -z $2 && -z $3 ) ]]; then - [[ -z $2 ]] && { builtin print -r -- "Assuming --all is passed"; sleep 3; } + [[ -z $2 ]] && { builtin print -r -- "Assuming --all is passed"; } .zinit-compile-uncompile-all 0; ___retval=$? else .zinit-uncompile-plugin "${2%%(///|//|/)}" "${3%%(///|//|/)}"; ___retval=$? @@ -3313,15 +3313,6 @@ if [[ -e ${${ZINIT[BIN_DIR]}}/zmodules/Src/zdharma/zplugin.so ]] { # create so that for sure no warncreateglobal warning is issued typeset -g REPLY -# a searchable menu of tags for current directory -zinit null light-mode autoload'zi-browse-symbol' for %$ZINIT[BIN_DIR] -zle -N zi-browse-symbol -zle -N zi-browse-symbol-backwards zi-browse-symbol -zle -N zi-browse-symbol-pbackwards zi-browse-symbol -zle -N zi-browse-symbol-pforwards zi-browse-symbol -zstyle -s ':zinit:browse-symbol' key ZINIT_TMP || ZINIT_TMP='\eQ' -[[ -n $ZINIT_TMP ]] && bindkey $ZINIT_TMP zi-browse-symbol - # Local Variables: # mode: Shell-Script # sh-indentation: 2