[archlinux] Fix function syntax to avoid clashes with aliases

See https://bugs.debian.org/871816

Fixes #6592
This commit is contained in:
Marc Cornellà 2018-04-15 15:53:43 +02:00 committed by GitHub
parent fa93ea0d75
commit 2fce6a0faf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -84,19 +84,19 @@ if (( $+commands[pacaur] )); then
fi fi
if (( $+commands[trizen] )); then if (( $+commands[trizen] )); then
upgrade() { function upgrade() {
trizen -Syu trizen -Syu
} }
elif (( $+commands[pacaur] )); then elif (( $+commands[pacaur] )); then
upgrade() { function upgrade() {
pacaur -Syu pacaur -Syu
} }
elif (( $+commands[yaourt] )); then elif (( $+commands[yaourt] )); then
upgrade() { function upgrade() {
yaourt -Syu yaourt -Syu
} }
else else
upgrade() { function upgrade() {
sudo pacman -Syu sudo pacman -Syu
} }
fi fi
@ -129,13 +129,13 @@ else
alias pacupd='sudo pacman -Sy' alias pacupd='sudo pacman -Sy'
fi fi
paclist() { function paclist() {
# Source: https://bbs.archlinux.org/viewtopic.php?id=93683 # Source: https://bbs.archlinux.org/viewtopic.php?id=93683
LC_ALL=C pacman -Qei $(pacman -Qu | cut -d " " -f 1) | \ 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}' awk 'BEGIN {FS=":"} /^Name/{printf("\033[1;36m%s\033[1;37m", $2)} /^Description/{print $2}'
} }
pacdisowned() { function pacdisowned() {
emulate -L zsh emulate -L zsh
tmp=${TMPDIR-/tmp}/pacman-disowned-$UID-$$ tmp=${TMPDIR-/tmp}/pacman-disowned-$UID-$$
@ -153,14 +153,14 @@ pacdisowned() {
comm -23 "$fs" "$db" comm -23 "$fs" "$db"
} }
pacmanallkeys() { function pacmanallkeys() {
emulate -L zsh emulate -L zsh
curl -s https://www.archlinux.org/people/{developers,trustedusers}/ | \ curl -s https://www.archlinux.org/people/{developers,trustedusers}/ | \
awk -F\" '(/pgp.mit.edu/) { sub(/.*search=0x/,""); print $1}' | \ awk -F\" '(/pgp.mit.edu/) { sub(/.*search=0x/,""); print $1}' | \
xargs sudo pacman-key --recv-keys xargs sudo pacman-key --recv-keys
} }
pacmansignkeys() { function pacmansignkeys() {
emulate -L zsh emulate -L zsh
for key in $*; do for key in $*; do
sudo pacman-key --recv-keys $key sudo pacman-key --recv-keys $key