Skip to content

Commit be4ecf3

Browse files
MrFlounderclaude
andcommitted
feat(draw): support positional title — crab draw "My Title"
When the first argument doesn't match an existing session ID, use it as the session title instead of ignoring it. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent ad0f422 commit be4ecf3

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

plugins/draw/src/cli.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -212,14 +212,12 @@ async function main(): Promise<void> {
212212
}
213213
}
214214

215-
// crab draw [--title "..."] — new session
216-
// If command looks like a session name but doesn't match, warn
217-
if (command && !command.startsWith('-')) {
218-
console.error(`No session matching "${command}". Starting new session instead.\n`);
219-
}
215+
// crab draw [--title "..."] or crab draw "title" — new session
216+
// Positional arg that didn't match a session ID is used as the title
217+
const title = getArg(args, '--title', '-t') || (command && !command.startsWith('-') ? command : undefined);
220218

221219
await startSession(projectRoot, {
222-
title: getArg(args, '--title', '-t'),
220+
title,
223221
collab: !hasFlag(args, '--no-tunnel'),
224222
tunnel: getArg(args, '--tunnel'),
225223
port: getArg(args, '--port') ? parseInt(getArg(args, '--port')!) : undefined,

0 commit comments

Comments
 (0)