[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
08/16: ui: 'display-generation' uses color when talking to a pager.
From: |
guix-commits |
Subject: |
08/16: ui: 'display-generation' uses color when talking to a pager. |
Date: |
Mon, 14 Feb 2022 09:53:40 -0500 (EST) |
civodul pushed a commit to branch master
in repository guix.
commit 5b6e31b020678dbbc289479b8ff1853c3fbd2085
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Wed Feb 9 22:23:27 2022 +0100
ui: 'display-generation' uses color when talking to a pager.
This makes sure that, say, 'guix pull -l' benefits from colors when its
output is piped to a pager, as long as the underlying terminal supports
it.
* guix/ui.scm (display-generation): Add second argument to 'highlight'.
---
guix/ui.scm | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/guix/ui.scm b/guix/ui.scm
index d1f92ce7be..238952723e 100644
--- a/guix/ui.scm
+++ b/guix/ui.scm
@@ -1900,7 +1900,9 @@ DURATION-RELATION with the current time."
(link (if (supports-hyperlinks?)
(cut file-hyperlink file <>)
identity))
- (header (format #f (link (highlight (G_ "Generation ~a\t~a")))
+ (header (format #f (link (highlight (G_ "Generation ~a\t~a")
+ (or (pager-wrapped-port)
+ (current-output-port))))
number
(date->string
(time-utc->date
- branch master updated (72dd5c8766 -> 41000d16c5), guix-commits, 2022/02/14
- 03/16: gnu: ghc@4: Use 'search-patches'., guix-commits, 2022/02/14
- 02/16: gnu: gcc: Add 2.95., guix-commits, 2022/02/14
- 05/16: gnu: Remove glibc@2.2.5 and gcc-2.95-wrapper., guix-commits, 2022/02/14
- 04/16: gnu: ghc@4: Build without referring to packages in commencement.scm., guix-commits, 2022/02/14
- 06/16: pull: '--list-generations' lists packages only with '--details'., guix-commits, 2022/02/14
- 08/16: ui: 'display-generation' uses color when talking to a pager.,
guix-commits <=
- 12/16: gnu: fcitx5-gtk: Add GTK 4 support., guix-commits, 2022/02/14
- 07/16: ui: 'with-paginated-output-port' gives access to the wrapped port., guix-commits, 2022/02/14
- 14/16: gnu: Add libnitrokey., guix-commits, 2022/02/14
- 15/16: gnu: Add cppcodec., guix-commits, 2022/02/14
- 01/16: gnu: nhc98: Build with the current tool chain., guix-commits, 2022/02/14
- 16/16: gnu: Add nitrokey-app., guix-commits, 2022/02/14
- 09/16: pull: '--list-generations' pipes its output to the pager., guix-commits, 2022/02/14
- 11/16: gnu: elixir: Fix regex for ERTS_BIN substitution., guix-commits, 2022/02/14
- 10/16: gnu: elixir: Fix file name argument to 'search-input-file'., guix-commits, 2022/02/14
- 13/16: gnu: fcitx5-gtk: Split IM module output for different version of GTK., guix-commits, 2022/02/14