mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-15 00:06:09 +03:00
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:
@ -111,7 +111,7 @@ if [[ "$GHOSTTY_SHELL_FEATURES" =~ ssh-(env|terminfo) ]]; then
|
||||
local 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
|
||||
builtin export "${v?}"
|
||||
|
@ -119,10 +119,10 @@
|
||||
COLORTERM=truecolor
|
||||
TERM_PROGRAM=ghostty
|
||||
]
|
||||
if (not-eq $E:GHOSTTY_VERSION '') {
|
||||
set vars = [$@vars TERM_PROGRAM_VERSION=$E:GHOSTTY_VERSION]
|
||||
if (not-eq $E:TERM_PROGRAM_VERSION '') {
|
||||
set vars = [$@vars TERM_PROGRAM_VERSION=$E:TERM_PROGRAM_VERSION]
|
||||
}
|
||||
|
||||
|
||||
for v $vars {
|
||||
set-env (str:split = $v | take 1) (str:split = $v | drop 1 | str:join =)
|
||||
var varname = (str:split = $v | take 1)
|
||||
@ -147,7 +147,7 @@
|
||||
} catch {
|
||||
echo "Warning: xterm-ghostty terminfo not found locally." >&2
|
||||
}
|
||||
|
||||
|
||||
if (not-eq $tinfo '') {
|
||||
echo "Setting up Ghostty terminfo on remote host..." >&2
|
||||
var cpath = '/tmp/ghostty-ssh-'$E:USER'-'(randint 0 32767)'-'(date +%s)
|
||||
@ -156,7 +156,7 @@
|
||||
command -v tic >/dev/null 2>&1 || { echo NO_TIC; exit 1; }
|
||||
mkdir -p ~/.terminfo 2>/dev/null && tic -x - 2>/dev/null && echo OK || echo FAIL
|
||||
')
|
||||
|
||||
|
||||
if (eq $result OK) {
|
||||
echo "Terminfo setup complete." >&2
|
||||
if (not-eq $target '') { $_CACHE add $target }
|
||||
|
@ -105,8 +105,8 @@ function __ghostty_setup --on-event fish_prompt -d "Setup ghostty integration"
|
||||
COLORTERM=truecolor \
|
||||
TERM_PROGRAM=ghostty
|
||||
|
||||
if test -n "$GHOSTTY_VERSION"
|
||||
set -a vars "TERM_PROGRAM_VERSION=$GHOSTTY_VERSION"
|
||||
if test -n "$TERM_PROGRAM_VERSION"
|
||||
set -a vars "TERM_PROGRAM_VERSION=$TERM_PROGRAM_VERSION"
|
||||
end
|
||||
|
||||
for v in $vars
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user