Guard shell integration against unset ZSH_NAME (#7942)

Co-authored-by: tianrking <tianrking@users.noreply.github.com>
This commit is contained in:
tianrkingandtianrking authored and GitHub committed 2026-07-16 19:55:52 +02:00
1 parent 2ef4bef4ac
commit 76b606ec59
1 file changed
+1 -1
+1 -1
View File
@@ -468,7 +468,7 @@ __wezterm_semantic_precmd() {
__wezterm_save_ps2="$PS2"
# Markup the left and right prompts so that the terminal
# knows that they are semantically prompt output.
if [[ -n "$ZSH_NAME" ]] ; then
if [[ -n "${ZSH_NAME-}" ]] ; then
PS1=$'%{\e]133;P;k=i\a%}'$PS1$'%{\e]133;B\a%}'
PS2=$'%{\e]133;P;k=s\a%}'$PS2$'%{\e]133;B\a%}'
else