Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Mar 2021 11:00:50 -0600
From:      "@lbutlr" <kremels@kreme.com>
To:        FreeBSD <freebsd-questions@freebsd.org>
Subject:   Re: pkg- searching by (partial) origin|category for installed packages/ports
Message-ID:  <FF84C03A-EC00-46FB-BC36-1F9B567AF2EE@kreme.com>
In-Reply-To: <CABObuOoXJ6w6F5=UNBbku23W=kBods4qs1w2ptjrMOV8qVO3FQ@mail.gmail.com>
References:  <CABObuOoXJ6w6F5=UNBbku23W=kBods4qs1w2ptjrMOV8qVO3FQ@mail.gmail.com>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
On 20 Mar 2021, at 04:50, parv/freebsd <parv.0zero9+freebsd@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=3D$@
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.

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




Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?FF84C03A-EC00-46FB-BC36-1F9B567AF2EE>