Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/shell-integration/bash/ghostty.bash
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,7 @@ if [[ "$GHOSTTY_SHELL_FEATURES" == *ssh-* ]]; then

# Configure environment variables for remote session
if [[ "$GHOSTTY_SHELL_FEATURES" == *ssh-env* ]]; then
ssh_opts+=(-o "SetEnv COLORTERM=truecolor")
ssh_opts+=(-o "SendEnv TERM_PROGRAM TERM_PROGRAM_VERSION")
ssh_opts+=(-o "SendEnv COLORTERM TERM_PROGRAM TERM_PROGRAM_VERSION")
fi

# Install terminfo on remote host if needed
Expand Down Expand Up @@ -180,7 +179,7 @@ if [[ "$GHOSTTY_SHELL_FEATURES" == *ssh-* ]]; then
fi

# Execute SSH with TERM environment variable
TERM="$ssh_term" builtin command ssh "${ssh_opts[@]}" "$@"
TERM="$ssh_term" COLORTERM=truecolor builtin command ssh "${ssh_opts[@]}" "$@"
}
fi

Expand Down
5 changes: 2 additions & 3 deletions src/shell-integration/elvish/lib/ghostty-integration.elv
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,7 @@
# Configure environment variables for remote session
if (has-value $features ssh-env) {
set ssh-opts = (conj $ssh-opts ^
-o "SetEnv COLORTERM=truecolor" ^
-o "SendEnv TERM_PROGRAM TERM_PROGRAM_VERSION")
-o "SendEnv COLORTERM TERM_PROGRAM TERM_PROGRAM_VERSION")
}

if (has-value $features ssh-terminfo) {
Expand Down Expand Up @@ -148,7 +147,7 @@
}
}

with [E:TERM = $ssh-term] {
with [E:TERM = $ssh-term E:COLORTERM = truecolor] {
(external ssh) $@ssh-opts $@args
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,7 @@ function __ghostty_setup --on-event fish_prompt -d "Setup ghostty integration"

# Configure environment variables for remote session
if contains ssh-env $features
set -a ssh_opts -o "SetEnv COLORTERM=truecolor"
set -a ssh_opts -o "SendEnv TERM_PROGRAM TERM_PROGRAM_VERSION"
set -a ssh_opts -o "SendEnv COLORTERM TERM_PROGRAM TERM_PROGRAM_VERSION"
end

# Install terminfo on remote host if needed
Expand Down Expand Up @@ -198,7 +197,7 @@ function __ghostty_setup --on-event fish_prompt -d "Setup ghostty integration"
end

# Execute SSH with TERM environment variable
TERM="$ssh_term" command ssh $ssh_opts $argv
TERM="$ssh_term" COLORTERM=truecolor command ssh $ssh_opts $argv
end
end

Expand Down
4 changes: 2 additions & 2 deletions src/shell-integration/nushell/vendor/autoload/ghostty.nu
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ export module ghostty {
# `ssh-env`: use xterm-256color and propagate COLORTERM/TERM_PROGRAM vars
if (has_feature "ssh-env") {
$ssh_env.TERM = "xterm-256color"
$ssh_env.COLORTERM = "truecolor"
$ssh_opts = [
"-o" "SetEnv COLORTERM=truecolor"
"-o" "SendEnv TERM_PROGRAM TERM_PROGRAM_VERSION"
"-o" "SendEnv COLORTERM TERM_PROGRAM TERM_PROGRAM_VERSION"
]
}

Expand Down
5 changes: 2 additions & 3 deletions src/shell-integration/zsh/ghostty-integration
Original file line number Diff line number Diff line change
Expand Up @@ -325,8 +325,7 @@ _ghostty_deferred_init() {

# Configure environment variables for remote session
if [[ "$GHOSTTY_SHELL_FEATURES" == *ssh-env* ]]; then
ssh_opts+=(-o "SetEnv COLORTERM=truecolor")
ssh_opts+=(-o "SendEnv TERM_PROGRAM TERM_PROGRAM_VERSION")
ssh_opts+=(-o "SendEnv COLORTERM TERM_PROGRAM TERM_PROGRAM_VERSION")
fi

# Install terminfo on remote host if needed
Expand Down Expand Up @@ -382,7 +381,7 @@ _ghostty_deferred_init() {
fi

# Execute SSH with TERM environment variable
TERM="$ssh_term" command ssh "${ssh_opts[@]}" "$@"
TERM="$ssh_term" COLORTERM=truecolor command ssh "${ssh_opts[@]}" "$@"
}
fi

Expand Down