diff --git a/src/shell-integration/bash/ghostty.bash b/src/shell-integration/bash/ghostty.bash index 996555a13de..d52857a554c 100644 --- a/src/shell-integration/bash/ghostty.bash +++ b/src/shell-integration/bash/ghostty.bash @@ -118,7 +118,7 @@ fi # if [[ -x "${SUPATERM_CLI_PATH:-}" && ! -x "${GHOSTTY_BIN_DIR:-}/ghostty" ]]; then function ssh() { - "$SUPATERM_CLI_PATH" ssh -- "$@" + "$SUPATERM_CLI_PATH" internal ssh -- "$@" } elif [[ "$GHOSTTY_SHELL_FEATURES" == *ssh-* ]]; then function ssh() { diff --git a/src/shell-integration/elvish/lib/ghostty-integration.elv b/src/shell-integration/elvish/lib/ghostty-integration.elv index f64412d4831..3ebdb00f526 100644 --- a/src/shell-integration/elvish/lib/ghostty-integration.elv +++ b/src/shell-integration/elvish/lib/ghostty-integration.elv @@ -84,7 +84,7 @@ } fn ssh-supaterm {|@args| - $E:SUPATERM_CLI_PATH ssh -- $@args + $E:SUPATERM_CLI_PATH internal ssh -- $@args } fn ssh-integration {|@args| 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 338d0d36821..f5141e8b9c0 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 @@ -124,7 +124,7 @@ function __ghostty_setup --on-event fish_prompt -d "Setup ghostty integration" set -l features (string split ',' -- "$GHOSTTY_SHELL_FEATURES") if test -x "$SUPATERM_CLI_PATH"; and not test -x "$GHOSTTY_BIN_DIR/ghostty" function ssh --wraps=ssh --description "SSH wrapper with Supaterm integration" - "$SUPATERM_CLI_PATH" ssh -- $argv + "$SUPATERM_CLI_PATH" internal ssh -- $argv end else if contains ssh-env $features; or contains ssh-terminfo $features function ssh --wraps=ssh --description "SSH wrapper with Ghostty integration" diff --git a/src/shell-integration/nushell/vendor/autoload/ghostty.nu b/src/shell-integration/nushell/vendor/autoload/ghostty.nu index f6a63a81f6a..5b0d529451e 100644 --- a/src/shell-integration/nushell/vendor/autoload/ghostty.nu +++ b/src/shell-integration/nushell/vendor/autoload/ghostty.nu @@ -10,7 +10,7 @@ export module ghostty { let ghostty = ($env.GHOSTTY_BIN_DIR? | default "") | path join "ghostty" let ghostty_executable = which $ghostty | is-not-empty if ((which $supaterm_cli | is-not-empty) and (not $ghostty_executable)) { - ^$supaterm_cli "ssh" "--" ...$args + ^$supaterm_cli "internal" "ssh" "--" ...$args return } diff --git a/src/shell-integration/zsh/ghostty-integration b/src/shell-integration/zsh/ghostty-integration index d4ca5cfb2ed..421c87ce46d 100644 --- a/src/shell-integration/zsh/ghostty-integration +++ b/src/shell-integration/zsh/ghostty-integration @@ -314,7 +314,7 @@ _ghostty_deferred_init() { # if [[ -x "${SUPATERM_CLI_PATH:-}" && ! -x "${GHOSTTY_BIN_DIR:-}/ghostty" ]]; then function ssh() { - "$SUPATERM_CLI_PATH" ssh -- "$@" + "$SUPATERM_CLI_PATH" internal ssh -- "$@" } elif [[ "$GHOSTTY_SHELL_FEATURES" == *ssh-* ]]; then function ssh() { diff --git a/test/shell-integration/supaterm-ssh.bash b/test/shell-integration/supaterm-ssh.bash index 6ff36b344e9..59893a18506 100755 --- a/test/shell-integration/supaterm-ssh.bash +++ b/test/shell-integration/supaterm-ssh.bash @@ -46,7 +46,7 @@ assert_route() { printf '%s\n' "$shell_name route passed" } -printf '%s\n' ssh -- -p 2222 'user@example host' >"$expected_path" +printf '%s\n' internal ssh -- -p 2222 'user@example host' >"$expected_path" "${test_env[@]}" bash --noprofile --norc -i -c \ "source \"\$1\"; ssh -p 2222 \"user@example host\"" \