zdharma-continuum / zinit

🌻 Flexible and fast ZSH plugin manager
MIT License
2.89k stars 125 forks source link

Fix to filter by CPU first #457

Closed yutkat closed 1 year ago

yutkat commented 1 year ago

Description

Fixed #456

How Has This Been Tested?

before

Downloading BurntSushi/ripgrep…
[gh-r] filters -> (unknown-|)linux-gnu (amd64|x86_64|x64) Linux
[gh-r] filter -> (unknown-|)linux-gnu
 - /BurntSushi/ripgrep/releases/download/13.0.0/ripgrep-13.0.0-arm-unknown-linux-gnueabihf.tar.gz

[gh-r] filter -> (amd64|x86_64|x64)
 - /BurntSushi/ripgrep/releases/download/13.0.0/ripgrep-13.0.0-arm-unknown-linux-gnueabihf.tar.gz

[gh-r] filter -> Linux
 - /BurntSushi/ripgrep/releases/download/13.0.0/ripgrep-13.0.0-arm-unknown-linux-gnueabihf.tar.gz

(Requesting `ripgrep-13.0.0-arm-unknown-linux-gnueabihf.tar.gz'…)
############################################################################################################################################################################### 100.0%
[ziextract] Unpacking the files from: `ripgrep-13.0.0-arm-unknown-linux-gnueabihf.tar.gz'…
[ziextract] Successfully extracted and assigned +x chmod to the file: ripgrep-13.0.0-arm-unknown-linux-gnueabihf/rg.
'ripgrep-13.0.0-arm-unknown-linux-gnueabihf/complete/_rg' -> '_rg'
Installed 2 completions. They are stored in the $INSTALLED_COMPS array.

after

Downloading BurntSushi/ripgrep…
[gh-r] filters -> (amd64|x86_64|x64) (unknown-|)linux-gnu Linux
[gh-r] filter -> (amd64|x86_64|x64)
 - /BurntSushi/ripgrep/releases/download/13.0.0/ripgrep-13.0.0-x86_64-apple-darwin.tar.gz
 - /BurntSushi/ripgrep/releases/download/13.0.0/ripgrep-13.0.0-x86_64-pc-windows-gnu.zip
 - /BurntSushi/ripgrep/releases/download/13.0.0/ripgrep-13.0.0-x86_64-pc-windows-msvc.zip
 - /BurntSushi/ripgrep/releases/download/13.0.0/ripgrep-13.0.0-x86_64-unknown-linux-musl.tar.gz

[gh-r] filter -> (unknown-|)linux-gnu
 - /BurntSushi/ripgrep/releases/download/13.0.0/ripgrep-13.0.0-x86_64-apple-darwin.tar.gz
 - /BurntSushi/ripgrep/releases/download/13.0.0/ripgrep-13.0.0-x86_64-pc-windows-gnu.zip
 - /BurntSushi/ripgrep/releases/download/13.0.0/ripgrep-13.0.0-x86_64-pc-windows-msvc.zip
 - /BurntSushi/ripgrep/releases/download/13.0.0/ripgrep-13.0.0-x86_64-unknown-linux-musl.tar.gz

[gh-r] filter -> Linux
 - /BurntSushi/ripgrep/releases/download/13.0.0/ripgrep-13.0.0-x86_64-unknown-linux-musl.tar.gz

(Requesting `ripgrep-13.0.0-x86_64-unknown-linux-musl.tar.gz'…)
############################################################################################################################################################################### 100.0%
[ziextract] Unpacking the files from: `ripgrep-13.0.0-x86_64-unknown-linux-musl.tar.gz'…
[ziextract] Successfully extracted and assigned +x chmod to the file: ripgrep-13.0.0-x86_64-unknown-linux-musl/rg.
'ripgrep-13.0.0-x86_64-unknown-linux-musl/complete/_rg' -> '_rg'
Installed 2 completions. They are stored in the $INSTALLED_COMPS array.

Types of changes

Checklist:

vladdoster commented 1 year ago

@yutkat Thank you for this PR, but it doesn't address the actual issue.

For context, filtering by system type must have higher precedence.

For example, the sharkdp/insect zunit test for macOS fails when first filtering by CPU TYPE.

Screenshot 2023-01-13 at 13 41 21
vladdoster commented 1 year ago

If you have time, please try my fix in PR #461!