close not rm

This commit is contained in:
Chris Wanstrath 2026-02-17 18:31:43 -08:00
parent f27eccf5b0
commit 19a1d0c563

View File

@ -96,13 +96,9 @@ program
await vm.claude(join(root, session.worktree))
})
// ── sandlot rm <branch> ──────────────────────────────────────────────
// ── sandlot close <branch> ───────────────────────────────────────────
program
.command("rm")
.argument("<branch>", "branch name")
.description("Remove a worktree and clean up the session")
.action(async (branch: string) => {
const closeAction = async (branch: string) => {
const root = await git.repoRoot()
const session = await state.getSession(root, branch)
const worktreeRel = session?.worktree ?? `.sandlot/${branch}`
@ -117,7 +113,18 @@ program
if (session) {
await state.removeSession(root, branch)
}
})
}
program
.command("close")
.argument("<branch>", "branch name")
.description("Remove a worktree and clean up the session")
.action(closeAction)
program
.command("rm", { hidden: true })
.argument("<branch>", "branch name")
.action(closeAction)
// ── sandlot vm ───────────────────────────────────────────────────────