Date: Thu, 22 Dec 2005 18:40:21 +0200 From: Vasil Dimov <vd@datamax.bg> To: freebsd-ports@freebsd.org Subject: portsearch: how to display search results Message-ID: <20051222164021.GA30104@qlovarnika.bg.datamax>
next in thread | raw e-mail | index | archive | help
--r5Pyd7+fXNt84Ff3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi all, I am working on a tool that will allow easy (portsearch -f something) and fast (less than a few seconds) to search for ports that install some file. I see two options for displaying the results: 1) the simple way Show each file that matches a given pattern with some information for the port that would install it. This means that one port may be shown more than once, which I find really irritating. Here is an example output when searching for files that match the regular expression bin/f.* Port: portabc File: bin/f1 Port: portabc File: bin/f2 Port: portxyz File: bin/f3 2) group files by port Show ports that have at least one file matching a given pattern with all the matching files they install Output from the same search criteria: Port: portabc File(s): bin/f1, bin/f2 Port: portxyz File(s): bin/f3 My research shows that Debian's ``apt-file search'' and Fedora's ``yum provides'' use "the simple way" and display one package more than once. But 2) seems to me to be the prettier output. What do you think? --=20 Vasil Dimov --r5Pyd7+fXNt84Ff3 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- iD8DBQFDqtb1Fw6SP/bBpCARAh9IAKCUnmi6j0J17zK/iLKPEEkMi9OLmQCeKuRS FqiQ+lm4pCpgA6fmeh+SeUg= =I5pR -----END PGP SIGNATURE----- --r5Pyd7+fXNt84Ff3--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20051222164021.GA30104>