feat(termsupport): add WezTerm window/tab title support (OSC 1, 2)

This adds TERM=wezterm to the list of supported terminals.
https://wezterm.org/recipes/passing-data.html?h=osc#user-vars

WezTerm uses TERM=xterm-256color by default, but it endorses users to use TERM=wezterm in their configuration:
https://wezterm.org/config/lua/config/term.html
With this patch, oh-my-zsh will still support setting the window and tab name.
This commit is contained in:
tobii-dev 2025-05-18 15:39:38 +02:00 committed by GitHub
commit 78cfcccce4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -17,7 +17,7 @@ function title {
: ${2=$1}
case "$TERM" in
cygwin|xterm*|putty*|rxvt*|konsole*|ansi|mlterm*|alacritty*|st*|foot*|contour*)
wezterm*|cygwin|xterm*|putty*|rxvt*|konsole*|ansi|mlterm*|alacritty*|st*|foot*|contour*)
print -Pn "\e]2;${2:q}\a" # set window name
print -Pn "\e]1;${1:q}\a" # set tab name
;;