mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-19 21:41:07 +01:00
plugins/archlinux: add pacls, pacown, pacweb
This commit is contained in:
parent
4fa4e5fe4a
commit
dc57d1881b
1 changed files with 15 additions and 0 deletions
|
@ -117,6 +117,8 @@ alias paclsorphans='sudo pacman -Qdt'
|
||||||
alias pacrmorphans='sudo pacman -Rs $(pacman -Qtdq)'
|
alias pacrmorphans='sudo pacman -Rs $(pacman -Qtdq)'
|
||||||
alias pacfileupg='sudo pacman -Fy'
|
alias pacfileupg='sudo pacman -Fy'
|
||||||
alias pacfiles='pacman -Fs'
|
alias pacfiles='pacman -Fs'
|
||||||
|
alias pacls='pacman -Ql'
|
||||||
|
alias pacown='pacman -Qo'
|
||||||
|
|
||||||
|
|
||||||
if (( $+commands[abs] && $+commands[aur] )); then
|
if (( $+commands[abs] && $+commands[aur] )); then
|
||||||
|
@ -169,3 +171,16 @@ function pacmansignkeys() {
|
||||||
--no-permission-warning --command-fd 0 --edit-key $key
|
--no-permission-warning --command-fd 0 --edit-key $key
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (( $+commands[xdg-open] )); then
|
||||||
|
function pacweb() {
|
||||||
|
pkg="$1"
|
||||||
|
infos="$(pacman -Si "$pkg")"
|
||||||
|
if [[ -z "$infos" ]]; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
repo="$(grep '^Repo' <<< "$infos" | grep -oP '[^ ]+$')"
|
||||||
|
arch="$(grep '^Arch' <<< "$infos" | grep -oP '[^ ]+$')"
|
||||||
|
xdg-open "https://www.archlinux.org/packages/$repo/$arch/$pkg/" &>/dev/null
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
|
Loading…
Reference in a new issue