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

Function unix

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

Source from the content-addressed store, hash-verified

106}
107
108async function unix() {
109 const text = await readFile("/etc/shells", "utf8").catch(() => "")
110 if (text) return Array.from(new Set(text.split("\n").filter((line) => line.trim() && !line.startsWith("#"))))
111 return ["/bin/bash", "/bin/zsh", "/bin/sh"]
112}
113
114function select(file: string | undefined, opts?: { acceptable?: boolean }) {
115 if (file && (!opts?.acceptable || ok(file))) {

Callers 2

listFunction · 0.85
prompt.test.tsFile · 0.85

Calls 2

readFileFunction · 0.85
fromMethod · 0.45

Tested by

no test coverage detected