From 363e911f779ddf8bda752fb8b6cd9a078962e400 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Fri, 4 Aug 2023 11:14:45 -0700 Subject: [PATCH] shell-integration/zsh: enable title changes --- src/shell-integration/zsh/ghostty-integration | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/shell-integration/zsh/ghostty-integration b/src/shell-integration/zsh/ghostty-integration index 32cddaeb8..3e85d23da 100755 --- a/src/shell-integration/zsh/ghostty-integration +++ b/src/shell-integration/zsh/ghostty-integration @@ -194,6 +194,12 @@ _ghostty_deferred_init() { _ghostty_report_pwd" _ghostty_report_pwd + # Enable terminal title changes. + functions[_ghostty_precmd]+=" + builtin print -rnu $_ghostty_fd \$'\\e]2;'\"\${(%):-%(4~|…/%3~|%~)}\"\$'\\a'" + functions[_ghostty_preexec]+=" + builtin print -rnu $_ghostty_fd \$'\\e]2;'\"\${(V)1}\"\$'\\a'" + # Enable cursor shape changes depending on the current keymap. # This implementation leaks blinking block cursor into external commands # executed from zle. For example, users of fzf-based widgets may find