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) }