processes: Write to $PAGER.

* guix/ui.scm (with-paginated-output-port): Export.
* guix/scripts/processes.scm (guix-processes): Use it instead of writing
directly to (current-output-port).
This commit is contained in:
Ludovic Courtès 2020-06-28 22:36:43 +02:00
parent e1f2f3df84
commit 1acc5e11be
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
2 changed files with 7 additions and 5 deletions

View File

@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2018, 2019 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@ -231,7 +231,8 @@ List the current Guix sessions and their processes."))
cons
'()))
(for-each (lambda (session)
(daemon-session->recutils session (current-output-port))
(newline))
(daemon-sessions)))
(with-paginated-output-port port
(for-each (lambda (session)
(daemon-session->recutils session port)
(newline port))
(daemon-sessions))))

View File

@ -121,6 +121,7 @@
file-hyperlink
location->hyperlink
with-paginated-output-port
relevance
package-relevance
display-search-results