mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-19 21:41:07 +01:00
[archlinux] Fix function syntax to avoid clashes with aliases
See https://bugs.debian.org/871816 Fixes #6592
This commit is contained in:
parent
fa93ea0d75
commit
2fce6a0faf
1 changed files with 8 additions and 8 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue