Add header and legend to session list output
This commit is contained in:
parent
2bba442f3c
commit
1edc7b92fb
|
|
@ -216,6 +216,8 @@ program
|
|||
const cols = process.stdout.columns || 80
|
||||
const prefixWidth = branchWidth + 4
|
||||
|
||||
console.log(` ${"BRANCH".padEnd(branchWidth)} PROMPT`)
|
||||
|
||||
for (const s of sessions) {
|
||||
const prompt = s.prompt ?? ""
|
||||
const icon = icons[statuses[s.branch]]
|
||||
|
|
@ -223,6 +225,8 @@ program
|
|||
const truncated = maxPrompt > 3 && prompt.length > maxPrompt ? prompt.slice(0, maxPrompt - 3) + "..." : prompt
|
||||
console.log(`${icon} ${s.branch.padEnd(branchWidth)} ${truncated}`)
|
||||
}
|
||||
|
||||
console.log(`\n◌ idle · ◯ active · ◎ unsaved · ● saved`)
|
||||
})
|
||||
|
||||
// ── sandlot open <branch> ─────────────────────────────────────────────
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user