diff options
author | Andrew Janke <andrew@apjanke.net> | 2015-07-31 22:23:12 -0400 |
---|---|---|
committer | Andrew Janke <andrew@apjanke.net> | 2015-07-31 22:23:12 -0400 |
commit | 90ea67edf0982923f82905d87bda5b685089f219 (patch) | |
tree | da06e4411b469c859cf437bd99992e3a7f337d4d | |
parent | 3d5b3430fd9da12f6e33f534e487fe9b18928ac7 (diff) | |
download | zsh-90ea67edf0982923f82905d87bda5b685089f219.tar.gz zsh-90ea67edf0982923f82905d87bda5b685089f219.tar.bz2 zsh-90ea67edf0982923f82905d87bda5b685089f219.zip |
termsupport: protect title() with `emulate -L zsh`
This prevents it from malfunctioning when `setopt prompt_subst` is off.
-rw-r--r-- | lib/termsupport.zsh | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/termsupport.zsh b/lib/termsupport.zsh index e1c2e2f93..973c4dcf6 100644 --- a/lib/termsupport.zsh +++ b/lib/termsupport.zsh @@ -7,6 +7,9 @@ # (In screen, only short_tab_title is used) # Limited support for Apple Terminal (Terminal can't set window and tab separately) function title { + emulate -L zsh + setopt prompt_subst + [[ "$EMACS" == *term* ]] && return # if $2 is unset use $1 as default |