From 90ea67edf0982923f82905d87bda5b685089f219 Mon Sep 17 00:00:00 2001 From: Andrew Janke Date: Fri, 31 Jul 2015 22:23:12 -0400 Subject: [PATCH] termsupport: protect title() with `emulate -L zsh` This prevents it from malfunctioning when `setopt prompt_subst` is off. --- lib/termsupport.zsh | 3 +++ 1 file changed, 3 insertions(+) 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