From cea89f54391c810198a7ace05f1063dd7e596bb7 Mon Sep 17 00:00:00 2001 From: Magnus Boman <6226312+kattjevfel@users.noreply.github.com> Date: Tue, 23 Jun 2020 17:57:04 +0200 Subject: [PATCH] archlinux: fix pacweb breaking when multiple packages found (#9059) Co-authored-by: Magnus Boman --- plugins/archlinux/archlinux.plugin.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/archlinux/archlinux.plugin.zsh b/plugins/archlinux/archlinux.plugin.zsh index 2d0c51b3d..4d39bd86b 100644 --- a/plugins/archlinux/archlinux.plugin.zsh +++ b/plugins/archlinux/archlinux.plugin.zsh @@ -212,8 +212,8 @@ if (( $+commands[xdg-open] )); then if [[ -z "$infos" ]]; then return fi - repo="$(grep '^Repo' <<< "$infos" | grep -oP '[^ ]+$')" - arch="$(grep '^Arch' <<< "$infos" | grep -oP '[^ ]+$')" + repo="$(grep -m 1 '^Repo' <<< "$infos" | grep -oP '[^ ]+$')" + arch="$(grep -m 1 '^Arch' <<< "$infos" | grep -oP '[^ ]+$')" xdg-open "https://www.archlinux.org/packages/$repo/$arch/$pkg/" &>/dev/null } fi