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

Function containsAnyPlaceholder

src/utils/bash/ast.ts:94–96  ·  view source on GitHub ↗

* All placeholder strings. Used for defense-in-depth: if a varScope value * contains ANY placeholder (exact or embedded), the value is NOT a pure * literal and cannot be trusted as a bare argument. Covers composites like * `VAR="prefix$(cmd)"` → `"prefix__CMDSUB_OUTPUT__"` — the substring check

(value: string)

Source from the content-addressed store, hash-verified

92 * `VAR=__TRACKED_VAR__ && rm $VAR` — treated as non-literal (conservative).
93 */
94function containsAnyPlaceholder(value: string): boolean {
95 return value.includes(CMDSUB_PLACEHOLDER) || value.includes(VAR_PLACEHOLDER)
96}
97
98/**
99 * Unquoted $VAR in bash undergoes word-splitting (on $IFS: space/tab/NL)

Callers 4

collectCommandsFunction · 0.85
walkVariableAssignmentFunction · 0.85
resolveSimpleExpansionFunction · 0.85
applyVarToScopeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected