mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-04-06 07:38:21 +00:00
zsh: improve title-related comment
This commit is contained in:
@@ -201,11 +201,9 @@ _ghostty_deferred_init() {
|
||||
_ghostty_report_pwd
|
||||
|
||||
if [[ "$GHOSTTY_SHELL_FEATURES" == *"title"* ]]; then
|
||||
# Enable terminal title changes.
|
||||
# Enable terminal title changes, formatted for user-friendly display.
|
||||
functions[_ghostty_precmd]+="
|
||||
builtin print -rnu $_ghostty_fd \$'\\e]2;'\"\${(%):-%(4~|…/%3~|%~)}\"\$'\\a'"
|
||||
# Strip control characters from the command to avoid displaying escape
|
||||
# sequences like \n in the title.
|
||||
functions[_ghostty_preexec]+="
|
||||
builtin print -rnu $_ghostty_fd \$'\\e]2;'\"\${1//[[:cntrl:]]}\"\$'\\a'"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user