MCPcopy Index your code
hub / github.com/anomalyco/opencode / dynamic

Function dynamic

packages/opencode/src/tool/shell.ts:174–179  ·  view source on GitHub ↗
(text: string, ps: boolean)

Source from the content-addressed store, hash-verified

172}
173
174function dynamic(text: string, ps: boolean) {
175 if (text.startsWith("(") || text.startsWith("@(")) return true
176 if (text.includes("$(") || text.includes("${") || text.includes("`")) return true
177 if (ps) return /\$(?!env:)/i.test(text)
178 return text.includes("$")
179}
180
181function prefix(text: string) {
182 const match = /[?*[]/.exec(text)

Callers 1

shell.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected