MCPcopy Index your code
hub / github.com/codeaashu/claude-code / buildShellCommand

Function buildShellCommand

src/utils/deepLink/terminalLauncher.ts:505–512  ·  view source on GitHub ↗

* Build a single-quoted POSIX shell command string. ONLY used by the * AppleScript paths (iTerm, Terminal.app) which have no argv interface.

(
  claudePath: string,
  claudeArgs: string[],
  cwd?: string,
)

Source from the content-addressed store, hash-verified

503 * AppleScript paths (iTerm, Terminal.app) which have no argv interface.
504 */
505function buildShellCommand(
506 claudePath: string,
507 claudeArgs: string[],
508 cwd?: string,
509): string {
510 const cdPrefix = cwd ? `cd ${shellQuote(cwd)} && ` : ''
511 return `${cdPrefix}${[claudePath, ...claudeArgs].map(shellQuote).join(' ')}`
512}
513
514/**
515 * POSIX single-quote escaping. Single-quoted strings have zero

Callers 1

launchMacosTerminalFunction · 0.85

Calls 1

shellQuoteFunction · 0.85

Tested by

no test coverage detected