Merge branch 'auto-list'

This commit is contained in:
Chris Wanstrath 2026-02-20 12:16:34 -08:00
commit 7732a3136e

View File

@ -801,6 +801,18 @@ complete -c sandlot -n "__fish_seen_subcommand_from vm; and not __fish_seen_subc
`)
})
// Default: show list if sessions exist, otherwise help
const args = process.argv.slice(2)
if (args.length === 0) {
try {
const root = await git.repoRoot()
const st = await state.load(root)
if (Object.keys(st.sessions).length > 0) {
process.argv.push("list")
}
} catch {}
}
program.parseAsync().catch((err) => {
console.error(`${err.message ?? err}`)
process.exit(1)