mirror of
https://github.com/instructkr/claude-code.git
synced 2026-05-30 09:16:44 +00:00
fix: plugins extra-arg errors now return non-null hint via newline-delimited usage string
Parity with #791 (config extra-arg fix). The plugins arg parser emitted 'unexpected extra arguments after claw plugins show ...' with no newline delimiter, so split_error_hint returned None. Added usage hint after newline. 60 CLI contract tests pass.
This commit is contained in:
@@ -1185,8 +1185,9 @@ fn parse_args(args: &[String]) -> Result<CliAction, String> {
|
||||
let action = tail.first().cloned();
|
||||
let target = tail.get(1).cloned();
|
||||
if tail.len() > 2 {
|
||||
// #797: append \n usage hint so split_error_hint extracts it (parity with #791 config fix)
|
||||
return Err(format!(
|
||||
"unexpected extra arguments after `claw {} {}`: {}",
|
||||
"unexpected extra arguments after `claw {} {}`: {}\nUsage: claw plugins [list|show <id>|install <id>|enable <id>|disable <id>|uninstall <id>|update <id>|help]",
|
||||
rest[0],
|
||||
tail[..2].join(" "),
|
||||
tail[2..].join(" ")
|
||||
|
||||
Reference in New Issue
Block a user