Skip to content

Commit

Permalink
fix: gh-r filters i686 (32 bit) for x86_64 (#226)
Browse files Browse the repository at this point in the history
* fix: gh-r filters i686 (32 bit) for x86_64

Closes #225

Signed-off-by: Vladislav Doster <[email protected]>
  • Loading branch information
vladdoster authored Apr 26, 2022
1 parent 450d3c1 commit 57f0d82
Show file tree
Hide file tree
Showing 2 changed files with 83 additions and 46 deletions.
101 changes: 69 additions & 32 deletions tests/gh-r.zunit
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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"
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
28 changes: 14 additions & 14 deletions zinit-install.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 57f0d82

Please sign in to comment.