guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#58660] [PATCH v2 2/3] etc: teams: Sort and itemize 'scope' field.


From: zimoun
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






reply via email to

[Prev in Thread] Current Thread [Next in Thread]