]> git.rmz.io Git - dotfiles.git/blobdiff - zsh/aliases/pacman.zsh
flexget: initial my_exists_movie plugin
[dotfiles.git] / zsh / aliases / pacman.zsh
index af0dc9e125a51fd07ff36592337661c25a34afca..8cb322c9e0ad649572beacdd6ce78d34f9b82edf 100644 (file)
@@ -21,7 +21,7 @@ paclist() {
   pacman -Qei | awk 'BEGIN {FS=": "}/^Name/{printf("\033[1;36m%s\033[0m ",$2)}/^Description/{print $2}'
 }
 # [l]ist [o]orphans
-alias paclo='sudo pacman -Qdt'
+alias paclo='pacman -Qdt'
 # [r]emove [o]orphans
 alias pacro='sudo pacman -Rnscu $(pacman -Qtdq)'
 
@@ -35,6 +35,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 +53,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"