[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
07/08: scripts: build: Highlight the current system with --list-systems.
From: |
guix-commits |
Subject: |
07/08: scripts: build: Highlight the current system with --list-systems. |
Date: |
Sun, 22 May 2022 09:15:58 -0400 (EDT) |
mothacehe pushed a commit to branch master
in repository guix.
commit 051c087d7187d705e98015e8654dd20f66ce23d4
Author: Mathieu Othacehe <othacehe@gnu.org>
AuthorDate: Sun May 8 18:52:33 2022 +0200
scripts: build: Highlight the current system with --list-systems.
* guix/scripts/build.scm (list-systems): Highlight it.
---
guix/scripts/build.scm | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/guix/scripts/build.scm b/guix/scripts/build.scm
index a09c54451f..4383a399a0 100644
--- a/guix/scripts/build.scm
+++ b/guix/scripts/build.scm
@@ -21,6 +21,7 @@
(define-module (guix scripts build)
#:use-module (guix ui)
+ #:use-module (guix colors)
#:use-module (guix scripts)
#:autoload (guix import json) (json->scheme-file)
#:use-module (guix store)
@@ -342,8 +343,15 @@ use '--no-offload' instead~%")))
"Print the available systems."
(display (G_ "The available systems are:\n"))
(newline)
- (format #t "~{ - ~a ~%~}"
- (sort (systems) string<?)))
+ (let ((systems*
+ (map (lambda (system)
+ (if (string=? system (%current-system))
+ (highlight
+ (string-append system " [current]"))
+ system))
+ (systems))))
+ (format #t "~{ - ~a ~%~}"
+ (sort systems* string<?))))
(define (list-targets)
"Print the available targets."
- branch master updated (6e0b2adf5f -> a4aa13c02f), guix-commits, 2022/05/22
- 05/08: platform: Add glibc-dynamic-linker field., guix-commits, 2022/05/22
- 07/08: scripts: build: Highlight the current system with --list-systems.,
guix-commits <=
- 01/08: platform: Introduce new platforms., guix-commits, 2022/05/22
- 02/08: platform: Add discovery support., guix-commits, 2022/05/22
- 06/08: linux: Remove system->linux-architecture procedure., guix-commits, 2022/05/22
- 03/08: ci: Do not rely on hardcoded cross-targets lists., guix-commits, 2022/05/22
- 04/08: scripts: Add --list-systems and --list-targets options., guix-commits, 2022/05/22
- 08/08: doc: Add a 'Foreign architectures' chapter., guix-commits, 2022/05/22