summaryrefslogtreecommitdiff
path: root/home
diff options
context:
space:
mode:
authorXiao Pan <gky44px1999@gmail.com>2023-03-27 19:32:03 -0700
committerXiao Pan <gky44px1999@gmail.com>2023-03-27 19:32:03 -0700
commit37abed7fd6201a8054158713f50fffe75eee4037 (patch)
tree0522e06e2261ff8fcb35b0aee43e26f1e3d59f96 /home
parent075afd00bc3043e54379a8b02d27387b65d2059f (diff)
pq, optimize
Diffstat (limited to 'home')
-rwxr-xr-xhome/xyz/.local/bin/pq6
1 files changed, 2 insertions, 4 deletions
diff --git a/home/xyz/.local/bin/pq b/home/xyz/.local/bin/pq
index 2b4c4358..85b2b365 100755
--- a/home/xyz/.local/bin/pq
+++ b/home/xyz/.local/bin/pq
@@ -1,7 +1,7 @@
#!/bin/sh
# Pacman Query, to manually determine remove the package or not
-f () {
+[ "$1" ] && {
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/[^$]'
@@ -9,6 +9,4 @@ f () {
pactree -r "$1"
printf '\n'
grrc "$1"
-}
-
-[ "$1" ] && f "$1" | "$PAGER"
+} | "$PAGER"