From 1acc5e11beb1b8eea9fe931455bf2c9a26a69aa3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Sun, 28 Jun 2020 22:36:43 +0200 Subject: [PATCH] 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 a2ab017490..01f7213e8c 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 +;;; Copyright © 2018, 2019, 2020 Ludovic Courtès ;;; ;;; This file is part of GNU Guix. ;;; @@ -231,7 +231,8 @@ (define options 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 0d3620f96f..d64bb68f05 100644 --- a/guix/ui.scm +++ b/guix/ui.scm @@ -121,6 +121,7 @@ (define-module (guix ui) file-hyperlink location->hyperlink + with-paginated-output-port relevance package-relevance display-search-results