Report supacode as TERM_PROGRAM#458
Merged
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
$TERM_PROGRAMreportedghosttyinside Supacode terminals. Ghostty seeds every surface withTERM_PROGRAM=ghostty; this overrides it tosupacodeso programs detect the real host terminal, and pairs it withTERM_PROGRAM_VERSIONset to the app version.The override rides on Supacode's existing bundled ghostty config (
envdirective), which loads after the user config and which Ghostty applies after its own defaults. No ghostty submodule patch and no xcframework rebuild.TERM_PROGRAM_VERSIONis always emitted with a concrete value: Ghostty seeds it before applyingenvoverrides, and theenvmap 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-appsucceeds.make testpasses; new coverage for the override builder (real version, blank-version fallback, whitespace trimming).echo $TERM_PROGRAMprintssupacode.Closes #440