Subject: [bug#58660] [PATCH 2/4] etc: teams: List members sorted by name.

From: zimoun <[email-masked]>
Date: Thu, 20 Oct 2022 15:28:12 +0200

* etc/teams.scm.in (list-members): Sort by name.
---
 etc/teams.scm.in | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/etc/teams.scm.in b/etc/teams.scm.in
index 394e4d7d46..8e18a5d206 100644
--- a/etc/teams.scm.in
+++ b/etc/teams.scm.in
@@ -548,7 +548,9 @@ (define port* (or port (current-output-port)))
              prefix
              (person-name member)
              (person-email member)))
-   (team-members team)))
+   (sort
+    (team-members team)
+    (lambda (m1 m2) (string<? (person-name m1) (person-name m2))))))
 
 (define (list-teams)
   "Print all teams, their scope and their members."
-- 
2.36.0