From 2fce6a0faf4e9c2c44521cd51ff8c88f11346e02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= Date: Sun, 15 Apr 2018 15:53:43 +0200 Subject: [PATCH] [archlinux] Fix function syntax to avoid clashes with aliases See https://bugs.debian.org/871816 Fixes #6592 --- plugins/archlinux/archlinux.plugin.zsh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/plugins/archlinux/archlinux.plugin.zsh b/plugins/archlinux/archlinux.plugin.zsh index 9172aaa70..79cc6ed11 100644 --- a/plugins/archlinux/archlinux.plugin.zsh +++ b/plugins/archlinux/archlinux.plugin.zsh @@ -84,19 +84,19 @@ if (( $+commands[pacaur] )); then fi if (( $+commands[trizen] )); then - upgrade() { + function upgrade() { trizen -Syu } elif (( $+commands[pacaur] )); then - upgrade() { + function upgrade() { pacaur -Syu } elif (( $+commands[yaourt] )); then - upgrade() { + function upgrade() { yaourt -Syu } else - upgrade() { + function upgrade() { sudo pacman -Syu } fi @@ -129,13 +129,13 @@ else alias pacupd='sudo pacman -Sy' fi -paclist() { +function paclist() { # Source: https://bbs.archlinux.org/viewtopic.php?id=93683 LC_ALL=C pacman -Qei $(pacman -Qu | cut -d " " -f 1) | \ awk 'BEGIN {FS=":"} /^Name/{printf("\033[1;36m%s\033[1;37m", $2)} /^Description/{print $2}' } -pacdisowned() { +function pacdisowned() { emulate -L zsh tmp=${TMPDIR-/tmp}/pacman-disowned-$UID-$$ @@ -153,14 +153,14 @@ pacdisowned() { comm -23 "$fs" "$db" } -pacmanallkeys() { +function pacmanallkeys() { 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() { +function pacmansignkeys() { emulate -L zsh for key in $*; do sudo pacman-key --recv-keys $key