GNU bug report logs - #58660
[PATCH 0/4] Minor tweaks of etc/teams.scm

Previous Next

Package: guix-patches;

Reported by: zimoun <zimon.toutoune <at> gmail.com>

Date: Thu, 20 Oct 2022 13:23:02 UTC

Severity: normal

Tags: moreinfo, patch

Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: zimoun <zimon.toutoune <at> gmail.com>
To: 58660 <at> debbugs.gnu.org
Cc: othacehe <at> gnu.org, zimoun <zimon.toutoune <at> gmail.com>
Subject: [bug#58660] [PATCH v2 2/3] etc: teams: Sort and itemize 'scope' field.
Date: Thu, 17 Nov 2022 21:28:19 +0100
* etc/teams.scm.in (list-teams): Sort and itemize the 'scope' field.
---
 etc/teams.scm.in | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/etc/teams.scm.in b/etc/teams.scm.in
index e4e0dc209d..3f90e0e6f2 100644
--- a/etc/teams.scm.in
+++ b/etc/teams.scm.in
@@ -562,7 +562,14 @@ (define width* (%text-width))
                  "<none>")
              (match (team-scope team)
                (() "")
-               (scope (format #f "scope: ~{~s ~}~%" scope))))
+               (scope-files
+                (fold
+                 (lambda (str fmt)
+                   (string-append fmt str))
+                 (format #f "scope:~%")
+                 (sort
+                  (map (lambda (scope) (format #f "+ ~a~%" scope)) scope-files)
+                  string<=?)))))
      (list-members team port* "+ ")
      (newline))
    (if team-names
-- 
2.38.1





This bug report was last modified 1 year and 349 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.