X-Git-Url: https://git.rmz.io/dotfiles.git/blobdiff_plain/4322868924b51e28d1e5d0cd48043a09bee6b60e..77941ca461b6e164533bbc88b08b9ba69490a07c:/zsh/aliases/pacman.zsh diff --git a/zsh/aliases/pacman.zsh b/zsh/aliases/pacman.zsh index a631edb..2db1503 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}' @@ -35,6 +37,12 @@ paci() { fi done } +# 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-$$ @@ -47,7 +55,7 @@ pacdisowned() { pacman -Qlq | sort -u > "$db" find /bin /etc /lib /sbin /usr \ - ! -name lost+found \ + ! \( -name lost+found -o -name local \) \ \( -type d -printf '%p/\n' -o -print \) | sort > "$fs" comm -23 "$fs" "$db"