summaryrefslogtreecommitdiff
path: root/home/xyz
diff options
context:
space:
mode:
authorXiao Pan <gky44px1999@gmail.com>2023-10-26 01:07:53 +0000
committerXiao Pan <gky44px1999@gmail.com>2023-10-26 01:07:53 +0000
commit1f5a33f97b4a039314c8877ba7715497a1ae66c6 (patch)
tree70ee279f4f5a7bf1851ba13221bc773d65b7f8c2 /home/xyz
parent06d255450f3380bb64e10a42dc8d73fa6de24ca8 (diff)
update
Diffstat (limited to 'home/xyz')
-rwxr-xr-xhome/xyz/.local/bin/pq11
1 files changed, 11 insertions, 0 deletions
diff --git a/home/xyz/.local/bin/pq b/home/xyz/.local/bin/pq
new file mode 100755
index 00000000..93f231f1
--- /dev/null
+++ b/home/xyz/.local/bin/pq
@@ -0,0 +1,11 @@
+#!/bin/sh
+# Pacman Query, to manually determine remove the package or not
+
+[ "$1" ] && {
+ #sed -n '/^Depends On/,/^Conflicts With/{/^Conflicts With/!p}; /^Description\|^URL\|^Groups\|^Installed Size\|^Install Reason/p'
+ pacman -Qi "$1" | awk '/^Depends On/{f=1} /^Conflicts With/{f=0} f||/^Description|^URL|^Groups|^Installed Size|^Install Reason/'
+ printf '\n'
+ pacman -Ql "$1" | grep '/bin/[^$]'
+ printf '\n'
+ pactree -r "$1"
+} | "$PAGER"