summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorWilliam Tan <[email protected]>2025-11-20 12:27:16 -0500
committerGitHub <[email protected]>2025-11-20 11:27:16 -0600
commit4393cf8dbe410c3dc18a454c84bd5755e976176b (patch)
tree41e06a1264b1fe3e2fb55adace9b993d467dcd4c
parent447a4ca8c3fe5d40ae7a270c8f76727cfd346524 (diff)
downloadopencode-4393cf8dbe410c3dc18a454c84bd5755e976176b.tar.gz
opencode-4393cf8dbe410c3dc18a454c84bd5755e976176b.zip
tweak: Prefer VISUAL environment variable over EDITOR per Unix convention (#4549)
Co-authored-by: Aiden Cline <[email protected]>
-rw-r--r--packages/opencode/src/cli/cmd/tui/util/editor.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/opencode/src/cli/cmd/tui/util/editor.ts b/packages/opencode/src/cli/cmd/tui/util/editor.ts
index 0aa69dcd8..f98e24b06 100644
--- a/packages/opencode/src/cli/cmd/tui/util/editor.ts
+++ b/packages/opencode/src/cli/cmd/tui/util/editor.ts
@@ -6,7 +6,7 @@ import { CliRenderer } from "@opentui/core"
export namespace Editor {
export async function open(opts: { value: string; renderer: CliRenderer }): Promise<string | undefined> {
- const editor = process.env["EDITOR"]
+ const editor = process.env["VISUAL"] || process.env["EDITOR"]
if (!editor) return
const filepath = join(tmpdir(), `${Date.now()}.md`)