* 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, )
| 503 | * AppleScript paths (iTerm, Terminal.app) which have no argv interface. |
| 504 | */ |
| 505 | function 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 |
no test coverage detected