pkg- searching by (partial) origin|category for installed packages/ports

@lbutlr kremels at kreme.com
Sun Mar 21 17:00:52 UTC 2021


On 20 Mar 2021, at 04:50, parv/freebsd <parv.0zero9+freebsd at gmail.com> wrote:
> How does one search for a installed port or package by (partial)
> origin/category? Failed attempts ...

I found searching ports very frustrating, so years ago I came up with this, which is not how anyone suggested I do this, instead suggesting a myriad of make and pig commands all of which did slightly different things and none what I wanted.

 # cat /usr/local/bin/pfind
#!/usr/local/bin/bash

TERM=$@
find /usr/ports -mindepth 2 -maxdepth 2 -iname "*${TERM}*" | grep -v distfiles


 # pfind x11 | grep wm
/usr/ports/graphics/libwmf-nox11
 # pfind wm | grep x11
/usr/ports/graphics/libwmf-nox11
/usr/ports/x11-clocks/wmtime
/usr/ports/x11-clocks/wmbday
/usr/ports/x11-clocks/wmbinclock
/usr/ports/x11-clocks/wmblueclock
/usr/ports/x11-clocks/wmcalclock
/usr/ports/x11-clocks/wmclock
/usr/ports/x11-clocks/wmfishtime
/usr/ports/x11-clocks/wmtimer
/usr/ports/x11-themes/fvwm-themes
/usr/ports/x11-themes/icewm-extra-themes
/usr/ports/x11-toolkits/gtksourceviewmm3
/usr/ports/x11-toolkits/wmapp
/usr/ports/x11-wm/spectrwm
/usr/ports/x11-wm/amiwm
/usr/ports/x11-wm/antiwm
. . .
. . .
Etc

Works for me. YMMV.

-- 
Y is for YORRICK whose head was knocked in
Z is for ZILLAH who drank too much gin



More information about the freebsd-questions mailing list