f6a2b973565618272d39491d5d1a350d453cf062

Author
Robby Russell <robby@planetargon.com>
Committer
Robby Russell <robby@planetargon.com>
Date

Message

Merge pull request #4203 from apjanke/title-protect-promptsubst

termsupport: protect title() with `emulate -L zsh` for portability

Diff

 1diff --git a/lib/termsupport.zsh b/lib/termsupport.zsh
 2index d667861ab65687736c452a2105a35c9c80e7c0cf..f4a996552e6f6ed3e51e212a0e6e5c9947874725 100644
 3--- a/lib/termsupport.zsh
 4+++ b/lib/termsupport.zsh
 5@@ -7,6 +7,9 @@
 6 # (In screen, only short_tab_title is used)
 7 # Limited support for Apple Terminal (Terminal can't set window and tab separately)
 8 function title {
 9+  emulate -L zsh
10+  setopt prompt_subst
11+  
12   [[ "$EMACS" == *term* ]] && return
13 
14   # if $2 is unset use $1 as default