From mboxrd@z Thu Jan 1 00:00:00 1970 From: raingloom Subject: Re: Package file indexing Date: Fri, 03 Jan 2020 17:00:10 +0100 Message-ID: <462f35f7596f7318d2b34cc300a7e27a69d2072c.camel@riseup.net> References: <20190314204941.GA21065@jasmine.lan> <87mulx9kuv.fsf@nckx> <87zhpx846u.fsf@ambrevar.xyz> <87bm21y2s2.fsf_-_@gnu.org> <87imw7cpe7.fsf@bababa.i-did-not-set--mail-host-address--so-tickle-me> <87pnqdhkpf.fsf@gnu.org> <87imlt3hr2.fsf@ambrevar.xyz> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:49006) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1inPOS-0006zP-EO for guix-devel@gnu.org; Fri, 03 Jan 2020 11:01:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1inPOR-00026Z-0o for guix-devel@gnu.org; Fri, 03 Jan 2020 11:01:44 -0500 Received: from mx1.riseup.net ([198.252.153.129]:59212) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1inPOP-000208-Kr for guix-devel@gnu.org; Fri, 03 Jan 2020 11:01:42 -0500 In-Reply-To: List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: zimoun , Pierre Neidhardt Cc: Guix-devel On Thu, 2020-01-02 at 23:50 +0100, zimoun wrote: > Hi, > > On Thu, 2 Jan 2020 at 18:12, Pierre Neidhardt > wrote: > > > Last but not least: previously we suggested adding a subcommand > > like > > "guix which" or "guix filesearch". In another thread, Simon > > suggested > > that this would be a bad idea and factoring the file search into > > "guix > > search" is probably better. > > It appears to me better for 2 reasons: > 1. because obviously "filesearch" is a kind of "search" ;-) so it > adds consistency. > 2. because it allows (in the near future) mixed research: "guix > search bin/hg python" applying the "python" filter only to the > packages returned by "bin/hg". And "guix search python bin/hg" search > the binary file "hg" only to the packages matching "python. > What about files in root (so, ones with no slashes in their path, at least in your syntax) and files you don't know the full path of, only their basename? Do you search for every word as a file path, just in case it might be one? To avoid confusion, I think this should be an option/subcommand of search. Something like -path and -name in find(1).