[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/05: processes: Write to $PAGER.
From: |
guix-commits |
Subject: |
01/05: processes: Write to $PAGER. |
Date: |
Sun, 28 Jun 2020 17:30:04 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit 1acc5e11beb1b8eea9fe931455bf2c9a26a69aa3
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Sun Jun 28 22:36:43 2020 +0200
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).
---
guix/scripts/processes.scm | 11 ++++++-----
guix/ui.scm | 1 +
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/guix/scripts/processes.scm b/guix/scripts/processes.scm
index a2ab017..01f7213 100644
--- a/guix/scripts/processes.scm
+++ b/guix/scripts/processes.scm
@@ -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))))
diff --git a/guix/ui.scm b/guix/ui.scm
index 0d3620f..d64bb68 100644
--- a/guix/ui.scm
+++ b/guix/ui.scm
@@ -121,6 +121,7 @@
file-hyperlink
location->hyperlink
+ with-paginated-output-port
relevance
package-relevance
display-search-results