From db5a94445f3b21b307c73ea72ed495bda891ef28 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 4 Jan 2016 22:27:38 +0100 Subject: guix package: Allow multiple '--search' flags. * guix/scripts/package.scm (find-packages-by-description): Change 'rx' parameter to 'regexps'. [matches-all?, matches-one?]: New procedures. Use them. (process-query): Collect regexps from all 'search' queries, and pass them to 'find-packages-by-description'. * tests/guix-package.sh: Add tests. * doc/guix.texi (Invoking guix package): Document it. --- doc/guix.texi | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/guix.texi b/doc/guix.texi index f155fbe818..a07bf824d6 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -10,7 +10,7 @@ @include version.texi @copying -Copyright @copyright{} 2012, 2013, 2014, 2015 Ludovic Courtès@* +Copyright @copyright{} 2012, 2013, 2014, 2015, 2016 Ludovic Courtès@* Copyright @copyright{} 2013, 2014 Andreas Enge@* Copyright @copyright{} 2013 Nikita Karetnikov@* Copyright @copyright{} 2015 Mathieu Lirzin@* @@ -1462,6 +1462,21 @@ name: gmp @dots{} @end example +It is also possible to refine search results using several @code{-s} +flags. For example, the following command returns a list of board +games: + +@example +$ guix package -s '\' -s game | recsel -p name +name: gnubg +@dots{} +@end example + +If we were to omit @code{-s game}, we would also get software packages +that deal with printed circuit boards; removing the angle brackets +around @code{board} would further add packages that have to do with +keyboards. + @item --show=@var{package} Show details about @var{package}, taken from the list of available packages, in @code{recutils} format (@pxref{Top, GNU recutils databases,, recutils, GNU -- cgit v1.2.3