MCPcopy Create free account
hub / github.com/anomalyco/opencode / auto

Function auto

packages/opencode/src/tool/shell.ts:147–152  ·  view source on GitHub ↗
(key: string, cwd: string, shell: string)

Source from the content-addressed store, hash-verified

145}
146
147function auto(key: string, cwd: string, shell: string) {
148 const name = key.toUpperCase()
149 if (name === "HOME") return os.homedir()
150 if (name === "PWD") return cwd
151 if (name === "PSHOME") return path.dirname(shell)
152}
153
154function expand(text: string, cwd: string, shell: string) {
155 const out = unquote(text)

Callers 3

expandFunction · 0.70
PromptFunction · 0.50
submitInnerFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected