config

OpenBSD system configuration
git clone git://jacobedwards.org/config
Log | Files | Refs | README

commit 5c7ec8444dd17791993a171f1839f30360340bd0
parent 490026b5398e4f0f398fc70ead53b830b7b6fac3
Author: Jacob R. Edwards <jacobouno@protonmail.com>
Date:   Sat, 27 Mar 2021 18:34:19 -0700

Tweak OpenBSD package shell functions

Pass the q[uiet] flag to pkg_info(1) in pi allowing for easy use
of external tools like this ``pd $(pi -m | grep zathura)''.

The pq function now uses the second field for package identification
since it has catagories which I think will be very useful.

Diffstat:
Mlocal/shell/.local/share/shell/openbsd | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/local/shell/.local/share/shell/openbsd b/local/shell/.local/share/shell/openbsd @@ -6,9 +6,9 @@ load() sysctl -n vm.loadavg "$@" # package management pa() doas pkg_add "$@" pd() doas pkg_delete "$@" -pi() pkg_info "$@" +pi() pkg_info -q "$@" pl() pkg_locate "${@:-.}" -pq() { cut -d'|' -f1,4 /usr/local/share/ports-INDEX | tr '|' '\t' | egrep "${@:-.}"; } +pq() { cut -d'|' -f2,4 </usr/local/share/ports-INDEX | tr '|' '\t' | egrep "${@:-.}" ;} pu() doas pkg_add -u "$@" pkg_depends() {