]> git.rmz.io Git - dotfiles.git/blobdiff - zsh/aliases/pacman.zsh
flexget: initial my_exists_movie plugin
[dotfiles.git] / zsh / aliases / pacman.zsh
index a631edb4654ceabbf0b3888d0997503d2219c5de..8cb322c9e0ad649572beacdd6ce78d34f9b82edf 100644 (file)
@@ -35,6 +35,12 @@ paci() {
         fi
     done
 }
         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-$$
 
 pacdisowned() {
   tmp=${TMPDIR-/tmp}/pacman-disowned-$UID-$$
@@ -47,7 +53,7 @@ pacdisowned() {
   pacman -Qlq | sort -u > "$db"
 
   find /bin /etc /lib /sbin /usr \
   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"
         \( -type d -printf '%p/\n' -o -print \) | sort > "$fs"
 
   comm -23 "$fs" "$db"