MCPcopy
hub / github.com/anomalyco/opencode / win

Function win

packages/core/src/shell.ts:98–106  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

96}
97
98function win() {
99 return Array.from(
100 new Set(
101 [which("pwsh"), which("powershell"), gitbash(), process.env.COMSPEC || "cmd.exe"]
102 .filter((item): item is string => Boolean(item))
103 .map(full),
104 ),
105 )
106}
107
108async function unix() {
109 const text = await readFile("/etc/shells", "utf8").catch(() => "")

Callers 2

selectFunction · 0.70
listFunction · 0.70

Calls 3

whichFunction · 0.90
gitbashFunction · 0.85
fromMethod · 0.45

Tested by

no test coverage detected