mirror of
https://github.com/instructkr/claude-code.git
synced 2026-05-28 16:36:45 +00:00
fix(#752): cli_parse unrecognized-arg errors now emit non-null hint for all subcommands
This commit is contained in:
@@ -1326,6 +1326,9 @@ fn parse_single_word_command_alias(
|
||||
// Hint at the correct flag so they don't have to re-read --help.
|
||||
if rest[1] == "--json" {
|
||||
msg.push_str("\nDid you mean `--output-format json`?");
|
||||
} else {
|
||||
// #752: generic fallback hint so cli_parse errors always have non-null hint
|
||||
msg.push_str(&format!("\nRun `claw {} --help` for usage.", verb));
|
||||
}
|
||||
return Some(Err(msg));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user