From e71ba84cc09a1f959f0222e64a71d5bd3d873251 Mon Sep 17 00:00:00 2001 From: Chris Wanstrath Date: Mon, 23 Mar 2026 21:35:20 -0700 Subject: [PATCH] Sort repositories alphabetically by name in list --all output --- src/commands/list.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/commands/list.ts b/src/commands/list.ts index 0dec953..cb8404d 100644 --- a/src/commands/list.ts +++ b/src/commands/list.ts @@ -130,7 +130,8 @@ export async function action(opts: { json?: boolean; all?: boolean }) { if (opts.all) { const byRepo = Map.groupBy(sessions, s => s.repoRoot) - for (const [repoRoot, repoSessions] of byRepo) { + const sorted = [...byRepo.entries()].sort((a, b) => basename(a[0]).localeCompare(basename(b[0]))) + for (const [repoRoot, repoSessions] of sorted) { console.log(`\n${dim}── ${reset}${basename(repoRoot)}${dim} ──${reset}`) renderSessions(repoSessions, statusMap) }