From b90c8944b4827ceaa3872e16c006bd1a375015d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= Date: Wed, 24 Aug 2016 08:51:06 +0200 Subject: [PATCH] archlinux: fix pacmanallkeys URL, make curl silent Also make all functions local as to not spill variables into the global namespace. --- plugins/archlinux/archlinux.plugin.zsh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/archlinux/archlinux.plugin.zsh b/plugins/archlinux/archlinux.plugin.zsh index ef862f14c..9c8c984b1 100644 --- a/plugins/archlinux/archlinux.plugin.zsh +++ b/plugins/archlinux/archlinux.plugin.zsh @@ -68,6 +68,8 @@ paclist() { } pacdisowned() { + emulate -L zsh + tmp=${TMPDIR-/tmp}/pacman-disowned-$UID-$$ db=$tmp/db fs=$tmp/fs @@ -84,12 +86,14 @@ pacdisowned() { } pacmanallkeys() { - curl https://www.archlinux.org/{developers,trustedusers}/ | \ + emulate -L zsh + curl -s https://www.archlinux.org/people/{developers,trustedusers}/ | \ awk -F\" '(/pgp.mit.edu/) { sub(/.*search=0x/,""); print $1}' | \ xargs sudo pacman-key --recv-keys } pacmansignkeys() { + emulate -L zsh for key in $*; do sudo pacman-key --recv-keys $key sudo pacman-key --lsign-key $key