MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / hasStdinRedirect

Function hasStdinRedirect

source code/utils/bash/shellQuoting.ts:83–88  ·  view source on GitHub ↗
(command: string)

Source from the content-addressed store, hash-verified

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