MCPcopy Create free account
hub / github.com/codeaashu/claude-code / extractArgsAfterDoubleDash

Function extractArgsAfterDoubleDash

src/utils/cliArgs.ts:49–60  ·  view source on GitHub ↗
(
  commandOrValue: string,
  args: string[] = [],
)

Source from the content-addressed store, hash-verified

47 * @returns Object with corrected command and args
48 */
49export function extractArgsAfterDoubleDash(
50 commandOrValue: string,
51 args: string[] = [],
52): { command: string; args: string[] } {
53 if (commandOrValue === '--' && args.length > 0) {
54 return {
55 command: args[0]!,
56 args: args.slice(1),
57 }
58 }
59 return { command: commandOrValue, args }
60}
61

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected