mirror of
https://github.com/qwibitai/nanoclaw.git
synced 2026-06-04 10:14:47 +08:00
feat(cli): support space-separated multi-word verbs
`ncl groups config get` now works alongside `ncl groups config-get`. Parser joins all positionals with dashes; dispatcher falls back by trimming the last segment as a target ID (`ncl groups get abc123`). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -165,12 +165,9 @@ function parseArgv(argv: string[]): {
|
||||
process.exit(2);
|
||||
}
|
||||
|
||||
const command = positional.length >= 2 ? `${positional[0]}-${positional[1]}` : positional[0];
|
||||
|
||||
// Third positional is the target ID
|
||||
if (positional.length >= 3) {
|
||||
args.id = positional[2];
|
||||
}
|
||||
// Join all positionals with dashes. The dispatcher trims the last
|
||||
// segment as a target ID if the full name isn't a registered command.
|
||||
const command = positional.join('-');
|
||||
|
||||
return { command, args, json };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user