Repository navigation
Fix bug in zsh ssh-terminfo integration #11031
What do you want to change?I want to contribute the following patch: mihi314@875985d --- a/src/shell-integration/zsh/ghostty-integration
+++ b/src/shell-integration/zsh/ghostty-integration
@@ -315,7 +315,7 @@ _ghostty_deferred_init() {
ssh_cpath_dir=$(mktemp -d "/tmp/ghostty-ssh-$ssh_user.XXXXXX" 2>/dev/null) || ssh_cpath_dir="/tmp/ghostty-ssh-$ssh_user.$$"
ssh_cpath="$ssh_cpath_dir/socket"
- if print "$ssh_terminfo" | command ssh "${ssh_opts[@]}" -o ControlMaster=yes -o ControlPath="$ssh_cpath" -o ControlPersist=60s "$@" '
+ if builtin print -r "$ssh_terminfo" | command ssh "${ssh_opts[@]}" -o ControlMaster=yes -o ControlPath="$ssh_cpath" -o ControlPersist=60s "$@" '
infocmp xterm-ghostty >/dev/null 2>&1 && exit 0
command -v tic >/dev/null 2>&1 || exit 1
mkdir -p ~/.terminfo 2>/dev/null && tic -x - 2>/dev/null && exit 0With zsh, when installing the ghostty terminfo on a server via the ssh-terminfo shell integration, parts of the terminfo get mangled. In particular, the newline escape sequence in gets interpreted by You can directly demonstrate this locally. This outputs a host of error messages: Whereas (Documentation for the Why do you want to make this change?Without this, the installed terminfo only works partially. For example the output of I've found a PR for fish (#7960) where a somewhat similar bug was fixed. But nothing for zsh. Instead of vouching for me, I'd also be fine with somebody else committing this change, if that makes things easier. Ghostty VersionI acknowledge that:
|
Replies: 1 comment
|
!vouch |
!vouch