From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Subject: bug#35551: guix search Date: Fri, 10 May 2019 12:17:30 +0200 Message-ID: <87sgtm1umd.fsf@gnu.org> References: <1666426.mZ6LCf6Yd0@omega> <2986777.FnrGXkQkEc@omega> <877eay4ts3.fsf@gnu.org> <3642152.sbCaK8LMaK@omega> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([209.51.188.92]:55281) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hP2bL-00052x-DA for bug-guix@gnu.org; Fri, 10 May 2019 06:18:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hP2bK-0008Sb-CV for bug-guix@gnu.org; Fri, 10 May 2019 06:18:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:51910) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hP2bK-0008SP-9H for bug-guix@gnu.org; Fri, 10 May 2019 06:18:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hP2bK-0005ba-3R for bug-guix@gnu.org; Fri, 10 May 2019 06:18:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <3642152.sbCaK8LMaK@omega> (Bruno Haible's message of "Fri, 10 May 2019 11:38:31 +0200") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Bruno Haible Cc: 35551-done@debbugs.gnu.org Hi Bruno, Bruno Haible skribis: >> I would hope that =E2=80=98guix search=E2=80=99 and =E2=80=98guix packag= e --list-available=E2=80=99 are >> easier than anything else, and that people value the idea of doing >> things locally. Also, a local search gives the right result while a >> remote service might give results for a different Guix revision. >>=20 >> Is there any specific reason why you were uncomfortable with these >> commands? I=E2=80=99m curious how we could improve the user experience = here. > > Yes. I was looking for a package that contains the 'ssh' command. > $ guix search ssh | less > returns libssh, libssh2, guile2.0-ssh, guile-ssh, sshpass, ..., > emacs-counsel-tramp. > The answer I was looking for was 'openssh', but it was hidden > among 66 packages. I see. > A search is good if the relevant results for the user occur > among the first screen. > > Possible improvements include: > > 1) If the search term is X and installing the package would cause > a program named X to appear in $PATH, then list this package first. > > This rule would have listed 'openssh' first. Also, for 'guix search gc= c', > it would now make 'gcc-toolchain' appear first (right?). I agree that this would be great, but we don=E2=80=99t know beforehand what commands a package provides. For that we=E2=80=99d need to resort to an external service providing this info. > 2) Another heuristic for presenting the "best" hits first: > Sort the graph of the packages (using dependencies as graph edges). > Then present the "base" packages (the packages which don't depend on > other packages) first. > > This will likely make packages that are bindings (guile-ssh, ruby-net-= ssh, > etc.) appear after openssh. This sounds like an interesting option, at least when one is searching for an application and not for a library. > 3) If the resulting list is longer than one screenful, present only the > names, not names + details. Like > $ guix search ssh | grep '^name:' > would do. > Even without the improvements 1) and 2), the command > $ guix search ssh | grep '^name:' | grep ssh | sort > produces a one-screenful result that I could have evaluated in 10 seco= nds. OK, though you would have been unable to see the descriptions. Another option I thought of would be to display only the 10 results with the highest relevance by default, when stdout is a terminal. Thoughts? Thanks, Ludo=E2=80=99.