mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-04-24 04:29:25 +02:00
Merge 1b79cfd5c6 into 9981214437
This commit is contained in:
commit
5517f7df7e
1 changed files with 21 additions and 0 deletions
|
|
@ -69,6 +69,27 @@ paclist() {
|
|||
alias paclsorphans='sudo pacman -Qdt'
|
||||
alias pacrmorphans='sudo pacman -Rs $(pacman -Qtdq)'
|
||||
|
||||
# list of files in package
|
||||
alias pacls='pacman -Ql'
|
||||
|
||||
# who owns this file?
|
||||
alias pacowns='pacman -Qo'
|
||||
alias pacown='pacowns'
|
||||
|
||||
# goto package's Arch Linux webpage
|
||||
if [[ -x "$(which xdg-open)" ]]; then
|
||||
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/" 2>&1 >/dev/null &
|
||||
}
|
||||
fi
|
||||
|
||||
pacdisowned() {
|
||||
tmp=${TMPDIR-/tmp}/pacman-disowned-$UID-$$
|
||||
db=$tmp/db
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue