fix: replace non-existent GHOSTTY_VERSION with TERM_PROGRAM_VERSION in shell integration

GHOSTTY_VERSION was mistakenly referenced but is never set. Use
TERM_PROGRAM_VERSION which is actually provided by Exec.zig from
build_config.version_string.
This commit is contained in:
Jason Rayne
2025-06-25 17:50:15 -07:00
parent b5372468e4
commit 076f742dd4
4 changed files with 10 additions and 10 deletions

View File

@@ -264,7 +264,7 @@ _ghostty_deferred_init() {
vars=(
COLORTERM=truecolor
TERM_PROGRAM=ghostty
${GHOSTTY_VERSION:+TERM_PROGRAM_VERSION=$GHOSTTY_VERSION}
${TERM_PROGRAM_VERSION:+TERM_PROGRAM_VERSION=$TERM_PROGRAM_VERSION}
)
for v in "${vars[@]}"; do
export "${v?}"
@@ -277,7 +277,7 @@ _ghostty_deferred_init() {
# Get target (only when needed for terminfo)
local target
target=$(command ssh -G "$@" 2>/dev/null | awk '/^(user|hostname) /{print $2}' | paste -sd'@')
if [[ -n "$target" ]] && "$_CACHE" chk "$target"; then
env+=(TERM=xterm-ghostty)
elif command -v infocmp >/dev/null 2>&1; then