diff options
| author | Ed Zynda <[email protected]> | 2025-05-16 14:27:28 +0300 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-05-16 06:27:28 -0500 |
| commit | 4a444e9c9b7674c6b07a1a012a6467e45c3af1ec (patch) | |
| tree | f4c85dbbe33a9edf6a4232fad62d7f6dad64490c /README.md | |
| parent | 623d132772b9c69dd6d99ed4004b26c46dbe43a4 (diff) | |
| download | opencode-4a444e9c9b7674c6b07a1a012a6467e45c3af1ec.tar.gz opencode-4a444e9c9b7674c6b07a1a012a6467e45c3af1ec.zip | |
feat: Make shell configurable via config file (#23)
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 33 |
1 files changed, 33 insertions, 0 deletions
@@ -136,6 +136,10 @@ You can configure OpenCode using environment variables: "command": "gopls" } }, + "shell": { + "path": "/bin/zsh", + "args": ["-l"] + }, "debug": false, "debugLSP": false } @@ -411,6 +415,35 @@ You can define any of the following color keys in your `customTheme`: You don't need to define all colors. Any undefined colors will fall back to the default "opencode" theme colors. +### Shell Configuration + +OpenCode allows you to configure the shell used by the `bash` tool. By default, it uses: +1. The shell specified in the config file (if provided) +2. The shell from the `$SHELL` environment variable (if available) +3. Falls back to `/bin/bash` if neither of the above is available + +To configure a custom shell, add a `shell` section to your `.opencode.json` configuration file: + +```json +{ + "shell": { + "path": "/bin/zsh", + "args": ["-l"] + } +} +``` + +You can specify any shell executable and custom arguments: + +```json +{ + "shell": { + "path": "/usr/bin/fish", + "args": [] + } +} +``` + ## Architecture OpenCode is built with a modular architecture: |
