perf(archlinux): improve paclist performance (#11764)

This commit is contained in:
WH-2099 2023-06-19 18:32:37 +08:00 committed by GitHub
parent f5cb9a6c97
commit c0e811c90d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -25,10 +25,7 @@ alias pacown='pacman -Qo'
alias pacupd="sudo pacman -Sy" alias pacupd="sudo pacman -Sy"
function paclist() { function paclist() {
local pkgs=$(LC_ALL=C pacman -Qqe) pacman -Qqe | xargs -I{} -P0 --no-run-if-empty pacman -Qs --color=auto "^{}\$"
for pkg in ${(f)pkgs}; do
pacman -Qs --color=auto "^${pkg}\$" || break
done
} }
function pacdisowned() { function pacdisowned() {