Skip to content

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

Closed

Description

@magnusrodseth

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.

Activity

  1. added
    discussionUsed for feature requests, proposals, ideas, etc. Open discussion
    on Jan 15, 2026
  2. added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Jan 15, 2026
  3. github-actions commented on Jan 15, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    • [Enhancement] Ability to toggle shell output #2581: [Enhancement] Ability to toggle shell output - This issue also requests the ability to reduce visual clutter from command output, though it focuses on general shell output rather than the environment prefix specifically.

    Feel free to ignore if this doesn't fully address your specific case.

  4. TomLucidor commented on Jan 21, 2026

    @TomLucidor

    I managed to witness local models (of the small and quantified kind) managed to repeat environment variables, multiple times over, which is oddly buggy. @magnusrodseth do you know how this is injected?

  5. github-actions commented on Mar 28, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.

  6. zxsleebu commented on Jun 8, 2026

    @zxsleebu

    yo?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

discussionUsed for feature requests, proposals, ideas, etc. Open discussionopentuiThis relates to changes in v1.0, now that opencode uses opentui

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions