diff options
author | Xiao Pan <gky44px1999@gmail.com> | 2023-03-06 21:37:18 -0800 |
---|---|---|
committer | Xiao Pan <gky44px1999@gmail.com> | 2023-03-06 21:37:18 -0800 |
commit | 992b3f7d4aac5ad524ead292508ec2d0cd34fdc5 (patch) | |
tree | b33cafd26e3107811d687be4ed1fb2e69bf19b8d /home | |
parent | 3cc31461a94007441536c38140a8e59c40496438 (diff) |
add pq
Diffstat (limited to 'home')
-rwxr-xr-x | home/xyz/.local/bin/pq | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/home/xyz/.local/bin/pq b/home/xyz/.local/bin/pq new file mode 100755 index 00000000..09ccd2b4 --- /dev/null +++ b/home/xyz/.local/bin/pq @@ -0,0 +1,14 @@ +#!/bin/sh +# Pacman Query, to manually determine remove the package or not + +f () { + pacman -Qi "$1" | awk '/^Optional Deps/{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" + printf '\n' + grep --color=always -IR "$1" "$XDG_DOCUMENTS_DIR/notes" +} + +[ "$1" ] && f "$1" | "$PAGER" |