fix+test(#753): claw -p (no arg) parity with #750: error_kind:missing_prompt with non-null hint

This commit is contained in:
YeonGyu-Kim
2026-05-26 20:46:27 +09:00
parent cfc26729cf
commit e93271356f
3 changed files with 51 additions and 1 deletions

View File

@@ -861,7 +861,8 @@ fn parse_args(args: &[String]) -> Result<CliAction, String> {
// Claw Code compat: -p "prompt" = one-shot prompt
let prompt = args[index + 1..].join(" ");
if prompt.trim().is_empty() {
return Err("-p requires a prompt string".to_string());
// #753: same missing_prompt shape as claw prompt (no arg) fix in #750
return Err("missing_prompt: -p requires a prompt string.\nUsage: claw -p <text> or claw prompt <text>".to_string());
}
return Ok(CliAction::Prompt {
prompt,