truncate prompt display to first line only

This commit is contained in:
Chris Wanstrath 2026-02-21 07:53:52 -08:00
parent cc1d2628a9
commit 2722761125

View File

@ -67,7 +67,7 @@ export async function action(opts: { json?: boolean }) {
console.log(` ${dim}${"BRANCH".padEnd(branchWidth)} PROMPT${reset}`)
for (const s of sessions) {
const prompt = (s.prompt ?? "").replace(/\n/g, " ")
const prompt = (s.prompt ?? "").split("\n")[0]
const status = statuses[s.branch]
const icon = icons[status]
const bc = branchColors[status]