summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAiden Cline <[email protected]>2025-08-13 20:04:04 -0500
committerGitHub <[email protected]>2025-08-13 20:04:04 -0500
commit4dea0209bbeb729050af168cc6202395560cd598 (patch)
tree552d72815762ebd8a766179382b5b065fb72ae14
parentbb4b24a05fed931f4fb3d8654e193091767681bd (diff)
downloadopencode-4dea0209bbeb729050af168cc6202395560cd598.tar.gz
opencode-4dea0209bbeb729050af168cc6202395560cd598.zip
fix: support fish shell (#1911)
-rw-r--r--packages/opencode/src/session/index.ts8
1 files changed, 7 insertions, 1 deletions
diff --git a/packages/opencode/src/session/index.ts b/packages/opencode/src/session/index.ts
index 41352f8b6..68c5fad8f 100644
--- a/packages/opencode/src/session/index.ts
+++ b/packages/opencode/src/session/index.ts
@@ -1055,7 +1055,13 @@ export namespace Session {
[[ -f ~/.bashrc ]] && source ~/.bashrc >/dev/null 2>&1 || true
eval "${input.command}"
`
- const proc = spawn(process.env["SHELL"] ?? "bash", ["-c", "-l", script], {
+ const shell = process.env["SHELL"] ?? "bash"
+ const isFish = shell.includes("fish")
+ const args = isFish
+ ? ["-c", script] // fish with just -c
+ : ["-c", "-l", script]
+
+ const proc = spawn(shell, args, {
cwd: app.path.cwd,
signal: abort.signal,
env: {