guix system: Add 'search' command.

* guix/scripts/system.scm (resolve-subcommand): New procedure.
(process-command): Handle 'search'.
(guix-system): Likewise.
(show-help): Augment.
* guix/scripts/system/search.scm: New file.
* po/guix/POTFILES.in: Add it.
* Makefile.am (MODULES): Add it.
* guix/ui.scm (%text-width): Export.
* doc/guix.texi (Invoking guix system): Document it.
(Service Types and Services): Mention 'guix system search'.
* tests/guix-system.sh: Test it.
This commit is contained in:
Ludovic Courtès 2017-09-13 16:07:30 +02:00
parent 0c0c1b21d9
commit 0649321d91
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5
7 changed files with 202 additions and 4 deletions

View file

@ -1,5 +1,5 @@
# GNU Guix --- Functional package management for GNU
# Copyright © 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
# Copyright © 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
#
# This file is part of GNU Guix.
#
@ -215,3 +215,7 @@ EOF
# In both cases 'my-torrc' should be properly resolved.
guix system build "$tmpdir/config.scm" -n
(cd "$tmpdir"; guix system build "config.scm" -n)
# Searching.
guix system search tor | grep "^name: tor"
guix system search anonym network | grep "^name: tor"