Skip to content

Report supacode as TERM_PROGRAM#458

Merged
sbertix merged 1 commit into
mainfrom
sbertix/gh-440
Jun 22, 2026
Merged

Report supacode as TERM_PROGRAM#458
sbertix merged 1 commit into
mainfrom
sbertix/gh-440

Conversation

@sbertix

@sbertix sbertix commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

$TERM_PROGRAM reported ghostty inside Supacode terminals. Ghostty seeds every surface with TERM_PROGRAM=ghostty; this overrides it to supacode so programs detect the real host terminal, and pairs it with TERM_PROGRAM_VERSION set to the app version.

The override rides on Supacode's existing bundled ghostty config (env directive), which loads after the user config and which Ghostty applies after its own defaults. No ghostty submodule patch and no xcframework rebuild.

TERM_PROGRAM_VERSION is always emitted with a concrete value: Ghostty seeds it before applying env overrides, and the env map can override a key but not clear it, so omitting it would leave Ghostty's version paired with the Supacode identity. A missing or blank app version falls back to a placeholder.

Testing

  • make build-app succeeds.
  • make test passes; new coverage for the override builder (real version, blank-version fallback, whitespace trimming).
  • Manual: echo $TERM_PROGRAM prints supacode.

Closes #440

Ghostty seeds every surface with TERM_PROGRAM=ghostty. Override it to
supacode via the bundled config env directive so programs detect the
real host terminal, and pair it with TERM_PROGRAM_VERSION set to the app
version. The version is always emitted because Ghostty's env map can
override a key but not clear its seeded value, falling back to a
placeholder when no app version is available.

Closes #440
@sbertix sbertix enabled auto-merge (squash) June 22, 2026 19:08
@tuist

tuist Bot commented Jun 22, 2026

Copy link
Copy Markdown

🛠️ Tuist Run Report 🛠️

Builds 🔨

Scheme Status Duration Commit
supacode 2m 43s b786b6eff

@sbertix sbertix merged commit 7a5c9ab into main Jun 22, 2026
1 of 2 checks passed
@sbertix sbertix deleted the sbertix/gh-440 branch June 22, 2026 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

$TERM_PROGRAM returns ghostty

1 participant