Skip to content

Commit 18f3e76

Browse files
committed
Don't expand command substitutions in screen titles.
1 parent b332c6e commit 18f3e76

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/termsupport.zsh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@ function title {
66
if [[ "$DISABLE_AUTO_TITLE" == "true" ]] || [[ "$EMACS" == *term* ]]; then
77
return
88
fi
9+
setopt +o promptsubst
910
if [[ "$TERM" == screen* ]]; then
1011
print -Pn "\ek$2:q\e\\" #set screen hardstatus, usually truncated at 20 chars
1112
elif [[ "$TERM" == xterm* ]] || [[ $TERM == rxvt* ]] || [[ "$TERM_PROGRAM" == "iTerm.app" ]]; then
1213
print -Pn "\e]2;$2:q\a" #set window name
1314
print -Pn "\e]1;$1:q\a" #set icon (=tab) name (will override window name on broken terminal)
1415
fi
16+
setopt -o promptsubst
1517
}
1618

1719
ZSH_THEME_TERM_TAB_TITLE_IDLE="%15<..<%~%<<" #15 char left truncated PWD

0 commit comments

Comments
 (0)