shell-integration: use $GHOSTTY_BIN_DIR/ghostty

Locate our ghostty binary using $GHOSTTY_BIN_DIR rather than searching
the PATH.
This commit is contained in:
Jon Parise
2025-07-09 17:25:34 -04:00
parent 87579b8594
commit f5f2a4dd20
3 changed files with 9 additions and 9 deletions

View File

@@ -124,7 +124,7 @@ if [[ "$GHOSTTY_SHELL_FEATURES" == *ssh-* ]]; then
builtin local ssh_target="${ssh_user}@${ssh_hostname}"
# Check if terminfo is already cached
if ghostty +ssh-cache --host="$ssh_target" >/dev/null 2>&1; then
if "$GHOSTTY_BIN_DIR/ghostty" +ssh-cache --host="$ssh_target" >/dev/null 2>&1; then
ssh_term="xterm-ghostty"
elif builtin command -v infocmp >/dev/null 2>&1; then
builtin local ssh_terminfo ssh_cpath_dir ssh_cpath
@@ -147,7 +147,7 @@ if [[ "$GHOSTTY_SHELL_FEATURES" == *ssh-* ]]; then
ssh_opts+=(-o "ControlPath=$ssh_cpath")
# Cache successful installation
ghostty +ssh-cache --add="$ssh_target" >/dev/null 2>&1 || true
"$GHOSTTY_BIN_DIR/ghostty" +ssh-cache --add="$ssh_target" >/dev/null 2>&1 || true
else
builtin echo "Warning: Failed to install terminfo." >&2
fi