From 57f0d82118ed626f04d4b9b8b26de48c9d7e0956 Mon Sep 17 00:00:00 2001 From: vladislav doster <10052309+vladdoster@users.noreply.github.com> Date: Tue, 26 Apr 2022 14:40:09 -0500 Subject: [PATCH] fix: gh-r filters i686 (32 bit) for x86_64 (#226) * fix: gh-r filters i686 (32 bit) for x86_64 Closes #225 Signed-off-by: Vladislav Doster --- tests/gh-r.zunit | 101 +++++++++++++++++++++++++++++++--------------- zinit-install.zsh | 28 ++++++------- 2 files changed, 83 insertions(+), 46 deletions(-) diff --git a/tests/gh-r.zunit b/tests/gh-r.zunit index 0ac1a6908..be09bc1d1 100755 --- a/tests/gh-r.zunit +++ b/tests/gh-r.zunit @@ -12,14 +12,6 @@ $act --version assert $state equals 0 } -@test 'aurora' { # Cross-platform beanstalkd queue server admin console - run zinit sbin"aurora" for @xuri/aurora - assert $state equals 0 - local aurora="$ZPFX/bin/aurora" - assert "$aurora" is_executable - $aurora -v - assert $state equals 0 -} @test 'asciigraph' { run zinit sbin"asciigraph" for @guptarohit/asciigraph assert $state equals 0 @@ -28,6 +20,14 @@ $asciigraph --help assert $state equals 0 } +@test 'aurora' { # Cross-platform beanstalkd queue server admin console + run zinit sbin"aurora" for @xuri/aurora + assert $state equals 0 + local aurora="$ZPFX/bin/aurora" + assert "$aurora" is_executable + $aurora -v + assert $state equals 0 +} @test 'bandwhich' { # Terminal bandwidth utilization tool [[ $OSTYPE =~ 'darwin*' ]] && skip 'Bandwhich test skipped on Darwin' run zinit sbin"bandwhich" for @imsnif/bandwhich @@ -173,7 +173,7 @@ $dust --version assert $state equals 0 } -@test 'dyff' { # /ˈdʏf/ - diff tool for YAML files, and sometimes JSON +@test 'dyff' { # diff tool for YAML files, and sometimes JSON run zinit sbin'**/dyff' for @homeport/dyff assert $state equals 0 local dyff="$ZPFX/bin/dyff" @@ -189,6 +189,14 @@ $exa --version assert $state equals 0 } +@test 'fd' { + run zinit sbin'**/fd' for @sharkdp/fd + assert $state equals 0 + local fd="$ZPFX/bin/fd" + assert "$fd" is_executable + $fd version + assert $state equals 0 +} @test 'fogg' { # Manage Infrastructure as Code with less pain run zinit sbin'**/f*g' for @chanzuckerberg/fogg assert $state equals 0 @@ -232,6 +240,14 @@ $gdu --version assert $state equals 0 } +@test 'ggsrun' { + run zinit sbin'* -> ggsrun' for @tanaikech/ggsrun + assert $state equals 0 + local git_sizer="$ZPFX/bin/ggsrun" + assert "$git_sizer" is_executable + $git_sizer --version + assert $state equals 0 +} @test 'gh-cli' { run zinit sbin'**/gh -> gh' for cli/cli assert $state equals 0 @@ -288,14 +304,6 @@ $git_sizer --version assert $state equals 0 } -@test 'ggsrun' { - run zinit sbin'* -> ggsrun' for @tanaikech/ggsrun - assert $state equals 0 - local git_sizer="$ZPFX/bin/ggsrun" - assert "$git_sizer" is_executable - $git_sizer --version - assert $state equals 0 -} @test 'glow' { # Render markdown on the CLI, with pizzazz! run zinit sbin'**/glow -> glow' for @charmbracelet/glow assert $state equals 0 @@ -352,12 +360,12 @@ $gothanks --help assert $state equals 0 } -@test 'heksa' { # CLI hex dumper with colors - run zinit sbin'**/heksa' for @raspi/heksa +@test 'grex' { # go test output for humans + run zinit sbin'* -> grex' for @pemistahl/grex assert $state equals 0 - local heksa="$ZPFX/bin/heksa" - assert "$heksa" is_executable - $heksa --help + local grex="$ZPFX/bin/gothanks" + assert "$grex" is_executable + $grex --help assert $state equals 0 } @test 'hadolint' { # Dockerfile linter, validate inline bash, written in Haskell @@ -368,6 +376,14 @@ $hadolint --help assert $state equals 0 } +@test 'heksa' { # CLI hex dumper with colors + run zinit sbin'**/heksa' for @raspi/heksa + assert $state equals 0 + local heksa="$ZPFX/bin/heksa" + assert "$heksa" is_executable + $heksa --help + assert $state equals 0 +} @test 'hexyl' { # CLI hex dumper with colors run zinit sbin'**/hexyl' for @sharkdp/hexyl assert $state equals 0 @@ -409,12 +425,12 @@ $igo --help assert $state equals 0 } -@test 'just' { # Just a command runner - run zinit sbin'**/just -> just' for casey/just +@test 'insect' { # High precision scientific calculator with support for physical units + run zinit sbin'* -> insect' for @sharkdp/insect assert $state equals 0 - local just="$ZPFX/bin/just" - assert "$just" is_executable - $just --version + local insect="$ZPFX/bin/insect" + assert "$insect" is_executable + $insect help assert $state equals 0 } @test 'jq' { # Command-line JSON processor @@ -425,6 +441,14 @@ $jq --version assert $state equals 0 } +@test 'just' { # Just a command runner + run zinit sbin'**/just -> just' for casey/just + assert $state equals 0 + local just="$ZPFX/bin/just" + assert "$just" is_executable + $just --version + assert $state equals 0 +} @test 'ko' { run zinit sbin'**/ko' for google/ko assert $state equals 0 @@ -433,6 +457,14 @@ $ko --help assert $state equals 0 } +@test 'lazygit' { + run zinit sbin'**/lazygit' for jesseduffield/lazygit + assert $state equals 0 + local lazygit="$ZPFX/bin/lazygit" + assert "$lazygit" is_executable + $lazygit --help + assert $state equals 0 +} @test 'lf' { # Terminal file manager run zinit sbin'**/lf' for @gokcehan/lf; assert $state equals 0 local lf="$ZPFX/bin/lf"; assert "$lf" is_executable @@ -500,7 +532,7 @@ $micro --version assert $state equals 0 } -@test 'mkcert' { # A simple zero-config tool to make locally trusted development certificates with any names you'd like +@test 'mkcert' { # A simple zero-config tool to make locally trusted development certificates run zinit sbin'* -> mkcert' for @FiloSottile/mkcert assert $state equals 0 local mkcert="$ZPFX/bin/mkcert" @@ -737,6 +769,11 @@ local wifiqr="$ZPFX/bin/wifiqr"; assert "$wifiqr" is_executable run $wifiqr -h; assert $state equals 0 } +@test 'xh' { # Friendly and fast tool for sending HTTP requests + run zinit sbin'**/xh -> xh' for @ducaale/xh; assert $state equals 0 + local xh="$ZPFX/bin/xh"; assert "$xh" is_executable + run $xh --version; assert $state equals 0 +} @test 'yabai' { # A tiling window manager for macOS based on binary space partitioning ! [[ $OSTYPE =~ 'darwin*' ]] && skip 'Yabai test skipped on Linux' run zinit sbin'**/yabai' for koekeishiya/yabai; assert $state equals 0 @@ -748,10 +785,10 @@ local yq="$ZPFX/bin/yq"; assert "$yq" is_executable run $yq --version; assert $state equals 0 } -@test 'xh' { # Friendly and fast tool for sending HTTP requests - run zinit sbin'**/xh -> xh' for @ducaale/xh; assert $state equals 0 - local xh="$ZPFX/bin/xh"; assert "$xh" is_executable - run $xh --version; assert $state equals 0 +@test 'zed' { # Tooling for super-structured data: a new and easier way to manipulate data + run zinit sbin'* -> zed' for @brimdata/zed; assert $state equals 0 + local zed="$ZPFX/bin/zed"; assert "$zed" is_executable + run $zed --version; assert $state equals 0 } @test 'zoxide' { # A smarter cd command run zinit sbin'**/zoxide' for @ajeetdsouza/zoxide; assert $state equals 0 diff --git a/zinit-install.zsh b/zinit-install.zsh index 3dc52f1b0..31bf680ae 100644 --- a/zinit-install.zsh +++ b/zinit-install.zsh @@ -1441,20 +1441,20 @@ builtin source "${ZINIT[BIN_DIR]}/zinit-side.zsh" || { local -A matchstr # aarch64 '((arm|(^(amd|x86)))64|aarch64)*^*(amd|x86_64)' matchstr=( - amd64 '((amd64|x86_64|)~*(aarch64|arm[v]?[0-9]?)*)' - android '(apk|android)' - arm64 '(arm64|aarch64|arm[v]?8)' - aarch64 '(arm64|aarch64|arm[v]?8)' - armv5 'armv?5' - armv6 'armv?6' - armv7 'armv?7' - cygwin '(cyg|-|_|)win(dows|32|64|))' - darwin '*((#s)|/)*(darwin*|osx|mac(os|))*((#e)|/)~*(ios|386)' - linux-gnu '*((#s)|/)*linux(([-_](musl|gnu))?|musl|gnu|)*((#e)|/)*' - linux-musl '*((#s)|/)*linux(([-_](musl))?|musl|)*((#e)|/)*' - msys '(cyg|-|_|)win(dows|32|64|))' - windows '(cyg|-|_|)win(dows|32|64|))' - x86_64 '*((amd64|x86_64)|)*~*(aarch64|arm64|armv[0-9]|[-_]arm)*' + android '(apk|android)' + amd64 '*((amd64|x86_64)|)*~*(aarch64|arm64|armv[0-9]|[-_]arm|[i-_]686)*' + x86_64 '*((amd64|x86_64)|)*~*(aarch64|arm64|armv[0-9]|[-_]arm|[i-_]686)*' + darwin '(darwin*|osx|mac|macos)*~*(386)*' + linux-gnu '*((#s)|/)*linux(([-_](musl|gnu))?|musl|gnu|)*((#e)|/)*' + linux-musl '*((#s)|/)*linux(([-_](musl))?|musl|)*((#e)|/)*' + aarch64 '(arm64|aarch64|arm[v]?8)' + arm64 '(arm64|aarch64|arm[v]?8)' + armv5 'armv?5' + armv6 'armv?6' + armv7 'armv?7' + cygwin '(cyg|-|_|)win(dows|32|64|))' + msys '(cyg|-|_|)win(dows|32|64|))' + windows '(cyg|-|_|)win(dows|32|64|))' ) local -a list init_list