Files
ghostty/src
Mitchell Hashimoto 39d163fee2 zsh: fix ssh-terminfo shell integration to not interpret escape characters (#11038)
With 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
```
> infocmp -0 -x xterm-ghostty | grep ind=
 ...,ind=\n,indn=...
 ```
gets interpreted by `print` as a literal newline, which then just gets ignored / does not have the intended effect.

Documentation for the `-r` flag of `print` used in the fix is [here](https://zsh.sourceforge.io/Doc/Release/Shell-Builtin-Commands.html#:~:text=Ignore%20the%20escape%20conventions%20of%20echo.).

### Testing locally
You can directly demonstrate this locally. This outputs a host of warning messages:
```
ssh_terminfo=$(infocmp -0 -x xterm-ghostty 2>/dev/null)
print "$ssh_terminfo" | tic -x -
```
Whereas
```print -r "$ssh_terminfo" | tic -x -```
or
```infocmp -0 -x xterm-ghostty | tic -x -```
work without issue.

### Testing remotely
The most visible way is to observe the output of `htop` before and after the change.

More directly, the output of `infocmp -x xterm-ghostty | grep " ind="` should be
```ich=\E[%p1%d@, ich1=\E[@, il=\E[%p1%dL, il1=\E[L, ind=\n,```
instead of 
```ich=\E[%p1%d@, ich1=\E[@, il=\E[%p1%dL, il1=\E[L, ind=,```

---

Discussed in #11031.

---
AI disclosure: I used Claude for parts of figuring out what was going on. The fix itself and the rest was written and tested by myself.
2026-02-26 13:17:24 -08:00
..
2025-10-03 07:10:43 -07:00
2025-11-27 13:37:53 -08:00
2025-11-27 13:37:53 -08:00
2025-10-03 18:52:26 +02:00
2025-10-03 07:10:43 -07:00
2026-02-01 14:32:37 -08:00
2025-11-27 13:37:53 -08:00
2025-11-27 13:37:53 -08:00
2026-02-17 12:54:29 -06:00
2025-10-03 07:10:43 -07:00
2026-01-08 10:22:56 -08:00
2025-11-24 19:55:27 -08:00
2025-11-27 13:37:53 -08:00
2025-11-27 13:37:53 -08:00
2024-08-16 14:35:10 -07:00
2025-07-09 15:06:24 -07:00
2022-08-18 11:42:32 -07:00
2025-10-03 07:10:43 -07:00
2026-01-31 09:06:07 -08:00
2025-11-27 13:37:53 -08:00