diff --git a/src/config/Config.zig b/src/config/Config.zig index 5fe950576..7f5e35d0d 100644 --- a/src/config/Config.zig +++ b/src/config/Config.zig @@ -6114,7 +6114,7 @@ pub const ShellIntegrationFeatures = packed struct { /// /// * `off` - No SSH integration, use standard ssh command /// -/// * `term_only` - Only fix TERM compatibility (xterm-ghostty -> xterm-256color) +/// * `term-only` - Only fix TERM compatibility (xterm-ghostty -> xterm-256color) /// /// * `basic` - TERM fix + environment variable propagation /// @@ -6123,7 +6123,7 @@ pub const ShellIntegrationFeatures = packed struct { /// The default value is `off`. pub const SSHIntegration = enum { off, - term_only, + @"term-only", basic, full, diff --git a/src/shell-integration/bash/ghostty.bash b/src/shell-integration/bash/ghostty.bash index f542261d4..349f65f1f 100644 --- a/src/shell-integration/bash/ghostty.bash +++ b/src/shell-integration/bash/ghostty.bash @@ -111,8 +111,8 @@ if [[ -n "$GHOSTTY_SSH_INTEGRATION" && "$GHOSTTY_SSH_INTEGRATION" != "off" ]]; t # will take precedence over this function, and it won't be wrapped. function ssh { case "$GHOSTTY_SSH_INTEGRATION" in - "term_only") - _ghostty_ssh_term_only "$@" + "term-only") + _ghostty_ssh_term-only "$@" ;; "basic") _ghostty_ssh_basic "$@" @@ -127,8 +127,8 @@ if [[ -n "$GHOSTTY_SSH_INTEGRATION" && "$GHOSTTY_SSH_INTEGRATION" != "off" ]]; t esac } - # Level: term_only - Just fix TERM compatibility - _ghostty_ssh_term_only() { + # Level: term-only - Just fix TERM compatibility + _ghostty_ssh_term-only() { if [[ "$TERM" == "xterm-ghostty" ]]; then TERM=xterm-256color command ssh "$@" else diff --git a/src/shell-integration/elvish/lib/ghostty-integration.elv b/src/shell-integration/elvish/lib/ghostty-integration.elv index 32f9ecbb6..257cd7ba6 100644 --- a/src/shell-integration/elvish/lib/ghostty-integration.elv +++ b/src/shell-integration/elvish/lib/ghostty-integration.elv @@ -100,7 +100,7 @@ fn ssh-with-ghostty-integration {|@args| if (and (has-env GHOSTTY_SSH_INTEGRATION) (not-eq "" $E:GHOSTTY_SSH_INTEGRATION) (not-eq "off" $E:GHOSTTY_SSH_INTEGRATION)) { - if (eq "term_only" $E:GHOSTTY_SSH_INTEGRATION) { + if (eq "term-only" $E:GHOSTTY_SSH_INTEGRATION) { ssh-term-only $@args } elif (eq "basic" $E:GHOSTTY_SSH_INTEGRATION) { ssh-basic $@args @@ -116,7 +116,7 @@ } fn ssh-term-only {|@args| - # Level: term_only - Just fix TERM compatibility + # Level: term-only - Just fix TERM compatibility if (eq "xterm-ghostty" $E:TERM) { TERM=xterm-256color (external ssh) $@args } else { diff --git a/src/shell-integration/fish/vendor_conf.d/ghostty-shell-integration.fish b/src/shell-integration/fish/vendor_conf.d/ghostty-shell-integration.fish index d03c98c7f..f899764de 100644 --- a/src/shell-integration/fish/vendor_conf.d/ghostty-shell-integration.fish +++ b/src/shell-integration/fish/vendor_conf.d/ghostty-shell-integration.fish @@ -90,8 +90,8 @@ function __ghostty_setup --on-event fish_prompt -d "Setup ghostty integration" if test -n "$GHOSTTY_SSH_INTEGRATION"; and test "$GHOSTTY_SSH_INTEGRATION" != off function ssh -d "Wrap ssh to provide Ghostty SSH integration" switch "$GHOSTTY_SSH_INTEGRATION" - case term_only - _ghostty_ssh_term_only $argv + case term-only + _ghostty_ssh_term-only $argv case basic _ghostty_ssh_basic $argv case full @@ -102,8 +102,8 @@ function __ghostty_setup --on-event fish_prompt -d "Setup ghostty integration" end end - # Level: term_only - Just fix TERM compatibility - function _ghostty_ssh_term_only -d "SSH with TERM compatibility fix" + # Level: term-only - Just fix TERM compatibility + function _ghostty_ssh_term-only -d "SSH with TERM compatibility fix" if test "$TERM" = xterm-ghostty TERM=xterm-256color command ssh $argv else @@ -143,18 +143,18 @@ function __ghostty_setup --on-event fish_prompt -d "Setup ghostty integration" # Full integration: Two-step terminfo installation if command -v infocmp >/dev/null 2>&1 echo "Installing Ghostty terminfo on remote host..." >&2 - + # Step 1: Install terminfo using the same approach that works manually # This requires authentication but is quick and reliable if infocmp -x xterm-ghostty 2>/dev/null | command ssh $argv 'mkdir -p ~/.terminfo/x 2>/dev/null && tic -x -o ~/.terminfo /dev/stdin 2>/dev/null' echo "Terminfo installed successfully. Connecting with full Ghostty support..." >&2 - + # Step 2: Connect with xterm-ghostty since we know terminfo is now available set -l env_vars - + # Use xterm-ghostty since we just installed it set -a env_vars TERM=xterm-ghostty - + # Propagate Ghostty shell integration environment variables if set -q GHOSTTY_SHELL_INTEGRATION_NO_CURSOR set -a env_vars GHOSTTY_SHELL_INTEGRATION_NO_CURSOR=$GHOSTTY_SHELL_INTEGRATION_NO_CURSOR @@ -165,7 +165,7 @@ function __ghostty_setup --on-event fish_prompt -d "Setup ghostty integration" if set -q GHOSTTY_SHELL_INTEGRATION_NO_TITLE set -a env_vars GHOSTTY_SHELL_INTEGRATION_NO_TITLE=$GHOSTTY_SHELL_INTEGRATION_NO_TITLE end - + # Normal SSH connection with Ghostty terminfo available env $env_vars ssh $argv return 0 @@ -173,7 +173,7 @@ function __ghostty_setup --on-event fish_prompt -d "Setup ghostty integration" echo "Terminfo installation failed. Using basic integration." >&2 end end - + # Fallback to basic integration _ghostty_ssh_basic $argv end diff --git a/src/shell-integration/zsh/ghostty-integration b/src/shell-integration/zsh/ghostty-integration index 58838d1f0..903b06dac 100644 --- a/src/shell-integration/zsh/ghostty-integration +++ b/src/shell-integration/zsh/ghostty-integration @@ -249,8 +249,8 @@ _ghostty_deferred_init() { # Wrap `ssh` command to provide Ghostty SSH integration ssh() { case "$GHOSTTY_SSH_INTEGRATION" in - "term_only") - _ghostty_ssh_term_only "$@" + "term-only") + _ghostty_ssh_term-only "$@" ;; "basic") _ghostty_ssh_basic "$@" @@ -265,8 +265,8 @@ _ghostty_deferred_init() { esac } - # Level: term_only - Just fix TERM compatibility - _ghostty_ssh_term_only() { + # Level: term-only - Just fix TERM compatibility + _ghostty_ssh_term-only() { if [[ "$TERM" == "xterm-ghostty" ]]; then TERM=xterm-256color builtin command ssh "$@" else