$ portfind portfind
+ portfind-1.6.1 (/usr/ports/ports-mgmt/portfind)
$ portfind pkg
- dpkg-1.18.9 (/usr/ports/archivers/dpkg)
- R-cran-pkgmaker-0.22 (/usr/ports/devel/R-cran-pkgmaker)
- fpc-fppkg-3.0.0 (/usr/ports/devel/fpc-fppkg)
- libgpkg-0.9.18_2 (/usr/ports/devel/libgpkg)
- p5-ExtUtils-PkgConfig-1.15_1 (/usr/ports/devel/p5-ExtUtils-PkgConfig)
- p5-PkgConfig-0.12026 (/usr/ports/devel/p5-PkgConfig)
- pkg-info.el-0.5_2 (/usr/ports/devel/pkg-info.el)
+ pkgconf-0.9.12_1 (/usr/ports/devel/pkgconf)
- py27-apipkg-1.2 (/usr/ports/devel/py-apipkg)
- py27-pkgconfig-1.1.0 (/usr/ports/devel/py-pkgconfig)
- rubygem-pkg-config-1.1.7_1 (/usr/ports/devel/rubygem-pkg-config)
- octave-forge-odepkg-0.8.5_1 (/usr/ports/math/octave-forge-odepkg)
- managepkg-1.1 (/usr/ports/ports-mgmt/managepkg)
- octopkg-0.2.0 (/usr/ports/ports-mgmt/octopkg)
+ pkg-1.8.7 (/usr/ports/ports-mgmt/pkg)
- pkg-devel-1.8.99.9 (/usr/ports/ports-mgmt/pkg-devel)
- pkg-plist-1.4_1 (/usr/ports/ports-mgmt/pkg-plist)
- pkg-rmleaf-0.3 (/usr/ports/ports-mgmt/pkg-rmleaf)
- pkg_cleanup-2.1 (/usr/ports/ports-mgmt/pkg_cleanup)
- pkg_cutleaves-20090810 (/usr/ports/ports-mgmt/pkg_cutleaves)
- pkg_jail-1.89 (/usr/ports/ports-mgmt/pkg_jail)
- pkg_replace-20160411 (/usr/ports/ports-mgmt/pkg_replace)
- pkg_rmleaves-20140222 (/usr/ports/ports-mgmt/pkg_rmleaves)
- pkg_search-1.3 (/usr/ports/ports-mgmt/pkg_search)
- pkg_tree-1.1_4 (/usr/ports/ports-mgmt/pkg_tree)
- pkgcompare-1.1 (/usr/ports/ports-mgmt/pkgcompare)
- pkgs_which-0.4.1 (/usr/ports/ports-mgmt/pkgs_which)
- firstboot-pkgs-1.4 (/usr/ports/sysutils/firstboot-pkgs)
- gnome-pkgview-1.0.7_6 (/usr/ports/sysutils/gnome-pkgview)
- py27-pkginfo-1.2.1 (/usr/ports/sysutils/py-pkginfo)
$ portfind foobar; echo $?
0