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

Function home

packages/opencode/src/tool/shell.ts:135–139  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

133}
134
135function home(text: string) {
136 if (text === "~") return os.homedir()
137 if (text.startsWith("~/") || text.startsWith("~\\")) return path.join(os.homedir(), text.slice(2))
138 return text
139}
140
141function envValue(key: string) {
142 if (process.platform !== "win32") return process.env[key]

Callers 2

expandFunction · 0.70
shell.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected