X-Git-Url: https://git.rmz.io/dotfiles.git/blobdiff_plain/5774a9d804cb050e16f9e74d486d45c4f45f908a..9706b307f43aaaef9c00b01e32ff08103dee76aa:/zsh/aliases/pacman.zsh?ds=sidebyside diff --git a/zsh/aliases/pacman.zsh b/zsh/aliases/pacman.zsh index d2ef8f8..5047b31 100644 --- a/zsh/aliases/pacman.zsh +++ b/zsh/aliases/pacman.zsh @@ -16,6 +16,8 @@ alias pacexp='sudo pacman -D --asexplicit' # Mark package as explicit alias pacinsd='sudo pacman -S --asdeps' # Install given package(s) as dependencies of another package alias pacmir='sudo pacman -Syy' # Force refresh of all package lists after updating /etc/pacman.d/mirrorlist +[[ -x /usr/bin/packer ]] && alias aur='packer' + # https://bbs.archlinux.org/viewtopic.php?id=93683 paclist() { pacman -Qei | awk 'BEGIN {FS=": "}/^Name/{printf("\033[1;36m%s\033[0m ",$2)}/^Description/{print $2}' @@ -38,6 +40,10 @@ paci() { # will only work after another pacman completion has been called first compdef '_pacman_completions_all_packages' paci=pacman +pacstat() { + LC_ALL=C pacman -Sl | sed -n '/\[installed\]/s/^\([^ ]*\).*/\1/p' | uniq -c +} + pacdisowned() { tmp=${TMPDIR-/tmp}/pacman-disowned-$UID-$$ db=$tmp/db @@ -49,7 +55,7 @@ pacdisowned() { pacman -Qlq | sort -u > "$db" find /bin /etc /lib /sbin /usr \ - ! \( -name lost+found -o -name local \) \ + ! \( -name lost+found -o -name local -o -path "*/share/mime/*" \) \ \( -type d -printf '%p/\n' -o -print \) | sort > "$fs" comm -23 "$fs" "$db"