summaryrefslogtreecommitdiff
path: root/guix-package.in
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2013-02-01 13:16:27 +0100
committerLudovic Courtès <ludo@gnu.org>2013-02-01 13:16:41 +0100
commit299112d36e872d98896bf8dec281c34d9adad06e (patch)
tree5642b1b322758f1e9919c93a89e793fad181ab81 /guix-package.in
parentaa92cf980cab9f085df11c79c4b27d2b8b0d88aa (diff)
downloadpatches-299112d36e872d98896bf8dec281c34d9adad06e.tar
patches-299112d36e872d98896bf8dec281c34d9adad06e.tar.gz
guix-package: Report `--search' matches in recutils format.
* guix/ui.scm (fill-paragraph, string->recutils, package->recutils): New procedures. * guix-package.in (guix-package)[process-query]: Use `package->recutils' to display package meta-data. * tests/guix-package.sh: Adjust test. * tests/ui.scm: New file. * Makefile.am (TESTS): Add it. * doc/guix.texi (Invoking guix-package): Adjust `--search' documentation, and give an example.
Diffstat (limited to 'guix-package.in')
-rw-r--r--guix-package.in6
1 files changed, 1 insertions, 5 deletions
diff --git a/guix-package.in b/guix-package.in
index 58164c6e46..e0c3287b3c 100644
--- a/guix-package.in
+++ b/guix-package.in
@@ -597,11 +597,7 @@ Install, remove, or upgrade PACKAGES in a single transaction.\n"))
(('search regexp)
(let ((regexp (and regexp (make-regexp regexp))))
- (for-each (lambda (p)
- (format #t "~a\t~a\t~a~%"
- (package-name p)
- (package-version p)
- (location->string (package-location p))))
+ (for-each (cute package->recutils <> (current-output-port))
(find-packages-by-description regexp))
#t))
(_ #f))))