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

Function quoteWithEvalStdinRedirect

src/utils/bash/bashPipeCommand.ts:262–264  ·  view source on GitHub ↗

* Quotes a command and adds `< /dev/null` as a shell redirect on eval, rather than * as an eval argument. This is critical for pipe commands where we can't parse the * pipe boundary (e.g., commands with $(), backticks, or control structures). * * Using `singleQuoteForEval(cmd) + ' < /dev/null'`

(command: string)

Source from the content-addressed store, hash-verified

260 * → eval concatenates args to 'cmd < /dev/null', redirect applies to LAST pipe command
261 */
262function quoteWithEvalStdinRedirect(command: string): string {
263 return singleQuoteForEval(command) + ' < /dev/null'
264}
265
266/**
267 * Single-quote a string for use as an eval argument. Escapes embedded single

Callers 1

rearrangePipeCommandFunction · 0.85

Calls 1

singleQuoteForEvalFunction · 0.85

Tested by

no test coverage detected