diff options
| author | Yihui Khuu <[email protected]> | 2025-08-16 04:24:34 +1000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-08-15 13:24:34 -0500 |
| commit | 70f14cccd6d4645cf448f518769cd4e1179d3cc8 (patch) | |
| tree | 471dd6724bf737a8c6328ff5639ae66fb4d57039 | |
| parent | 86df4073d193151949ab658dea32d0d16437f02a (diff) | |
| download | opencode-70f14cccd6d4645cf448f518769cd4e1179d3cc8.tar.gz opencode-70f14cccd6d4645cf448f518769cd4e1179d3cc8.zip | |
feat(shell): load .zshenv and respect ZDOTDIR if present (#1958)
| -rw-r--r-- | packages/opencode/src/session/index.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/packages/opencode/src/session/index.ts b/packages/opencode/src/session/index.ts index 7dcffb070..2455962d8 100644 --- a/packages/opencode/src/session/index.ts +++ b/packages/opencode/src/session/index.ts @@ -1066,7 +1066,8 @@ export namespace Session { const script = scripts[shellName] ?? - `[[ -f ~/.zshrc ]] && source ~/.zshrc >/dev/null 2>&1 || true + `[[ -f ~/.zshenv ]] && source ~/.zshenv >/dev/null 2>&1 || true + [[ -f "\${ZDOTDIR:-$HOME}/.zshrc" ]] && source "\${ZDOTDIR:-$HOME}/.zshrc" >/dev/null 2>&1 || true [[ -f ~/.bashrc ]] && source ~/.bashrc >/dev/null 2>&1 || true eval "${input.command}"` |
