diff options
author | Andrew Janke <andrew@apjanke.net> | 2015-08-17 20:55:41 -0400 |
---|---|---|
committer | Andrew Janke <andrew@apjanke.net> | 2015-08-17 20:55:41 -0400 |
commit | 47d19cc56425aa7c550d845726111ee8bd9520d1 (patch) | |
tree | eaf703568388f73285f7ae966b8154beb257f3a7 /lib | |
parent | 96c34cebae5da3a52e7da0d61188c1f9822a9c2e (diff) | |
download | zsh-47d19cc56425aa7c550d845726111ee8bd9520d1.tar.gz zsh-47d19cc56425aa7c550d845726111ee8bd9520d1.tar.bz2 zsh-47d19cc56425aa7c550d845726111ee8bd9520d1.zip |
Add defensive `emulate -L zsh` to termsupport functions
Diffstat (limited to 'lib')
-rw-r--r-- | lib/termsupport.zsh | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/termsupport.zsh b/lib/termsupport.zsh index 726cdce41..ff61d5329 100644 --- a/lib/termsupport.zsh +++ b/lib/termsupport.zsh @@ -7,6 +7,7 @@ # (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 [[ "$EMACS" == *term* ]] && return # if $2 is unset use $1 as default @@ -26,6 +27,7 @@ ZSH_THEME_TERM_TITLE_IDLE="%n@%m: %~" # Runs before showing the prompt function omz_termsupport_precmd { + emulate -L zsh if [[ $DISABLE_AUTO_TITLE == true ]]; then return fi @@ -35,11 +37,11 @@ function omz_termsupport_precmd { # Runs before executing the command function omz_termsupport_preexec { + emulate -L zsh if [[ $DISABLE_AUTO_TITLE == true ]]; then return fi - emulate -L zsh setopt extended_glob # cmd name only, or if this is sudo or ssh, the next cmd @@ -61,6 +63,7 @@ if [[ "$TERM_PROGRAM" == "Apple_Terminal" ]] && [[ -z "$INSIDE_EMACS" ]]; then # Emits the control sequence to notify Terminal.app of the cwd function update_terminalapp_cwd() { + emulate -L zsh # Identify the directory using a "file:" scheme URL, including # the host name to disambiguate local vs. remote paths. |