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

Function hasStdinRedirect

src/utils/bash/shellQuoting.ts:81–86  ·  view source on GitHub ↗
(command: string)

Source from the content-addressed store, hash-verified

79 * But not <<EOF (heredoc), << (bit shift), or <(process substitution)
80 */
81export function hasStdinRedirect(command: string): boolean {
82 // Look for < followed by whitespace and a filename/path
83 // Negative lookahead to exclude: <<, <(
84 // Must be preceded by whitespace or command separator or start of string
85 return /(?:^|[\s;&|])<(?![<(])\s*\S+/.test(command)
86}
87
88/**
89 * Checks if stdin redirect should be added to a command

Callers 1

shouldAddStdinRedirectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected