Sort repositories alphabetically by name in list --all output
This commit is contained in:
parent
d402a3f980
commit
e71ba84cc0
|
|
@ -130,7 +130,8 @@ export async function action(opts: { json?: boolean; all?: boolean }) {
|
||||||
|
|
||||||
if (opts.all) {
|
if (opts.all) {
|
||||||
const byRepo = Map.groupBy(sessions, s => s.repoRoot)
|
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}`)
|
console.log(`\n${dim}── ${reset}${basename(repoRoot)}${dim} ──${reset}`)
|
||||||
renderSessions(repoSessions, statusMap)
|
renderSessions(repoSessions, statusMap)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user