[FEATURE]: Option to hide environment variable prefix in bash command display #6189

Open
opened 2026-02-16 18:01:32 -05:00 by yindo · 0 comments
Owner

Originally created by @magnusrodseth on GitHub (Jan 15, 2026).

Originally assigned to: @rekram1-node on GitHub.

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

Currently, when OpenCode executes bash commands, the TUI displays the full environment variable setup:

$ export CI=true DEBIAN_FRONTEND=noninteractive GIT_TERMINAL_PROMPT=0 GCM_INTERACTIVE=never HOMEBREW_NO_AUTO_UPDATE=1 GIT_EDITOR=: EDITOR=: VISUAL='' GIT_SEQUENCE_EDITOR=: GIT_MERGE_AUTOEDIT=no GIT_PAGER=cat PAGER=cat npm_config_yes=true PIP_NO_INPUT=1 YARN_ENABLE_IMMUTABLE_INSTALLS=false; git status

This is visually noisy and makes it hard to see the actual command being run.

Requested feature: Add a config option to hide or collapse the environment prefix, showing only the meaningful command:

$ git status

Benefits:

  • Cleaner, more readable command output
  • Easier to follow what the agent is actually doing
  • The env vars are a safety mechanism (preventing interactive prompts) - users don't need to see them every time
  • Could be a simple boolean in opencode.json like "bash": { "showEnvPrefix": false }

The env vars should still be set internally - this is purely a display preference.

Originally created by @magnusrodseth on GitHub (Jan 15, 2026). Originally assigned to: @rekram1-node on GitHub. ### Feature hasn't been suggested before. - [x] I have verified this feature I'm about to request hasn't been suggested before. ### Describe the enhancement you want to request Currently, when OpenCode executes bash commands, the TUI displays the full environment variable setup: ``` $ export CI=true DEBIAN_FRONTEND=noninteractive GIT_TERMINAL_PROMPT=0 GCM_INTERACTIVE=never HOMEBREW_NO_AUTO_UPDATE=1 GIT_EDITOR=: EDITOR=: VISUAL='' GIT_SEQUENCE_EDITOR=: GIT_MERGE_AUTOEDIT=no GIT_PAGER=cat PAGER=cat npm_config_yes=true PIP_NO_INPUT=1 YARN_ENABLE_IMMUTABLE_INSTALLS=false; git status ``` This is visually noisy and makes it hard to see the actual command being run. **Requested feature**: Add a config option to hide or collapse the environment prefix, showing only the meaningful command: ``` $ git status ``` **Benefits**: - Cleaner, more readable command output - Easier to follow what the agent is actually doing - The env vars are a safety mechanism (preventing interactive prompts) - users don't need to see them every time - Could be a simple boolean in opencode.json like `"bash": { "showEnvPrefix": false }` The env vars should still be set internally - this is purely a display preference.
yindo added the opentuidiscussion labels 2026-02-16 18:01:32 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#6189