浏览代码

archlinux: fix pacmanallkeys URL, make curl silent

Also make all functions local as to not spill variables into the
global namespace.
Marc Cornellà 8 年之前
父节点
当前提交
b90c8944b4
共有 1 个文件被更改,包括 5 次插入1 次删除
  1. 5 1
      plugins/archlinux/archlinux.plugin.zsh

+ 5 - 1
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