From 98b7ed2950c0432bc2e2c103637bee5dbce0fffe Mon Sep 17 00:00:00 2001 From: ZyX Date: Wed, 1 May 2013 23:39:19 +0400 Subject: [PATCH] Reset emulate call: - only emulate -L causes options to be restore after function call - using setopt outside of functions does not reintroduce #342 --- powerline/bindings/zsh/powerline.zsh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/powerline/bindings/zsh/powerline.zsh b/powerline/bindings/zsh/powerline.zsh index 301bc411..89b86cff 100644 --- a/powerline/bindings/zsh/powerline.zsh +++ b/powerline/bindings/zsh/powerline.zsh @@ -15,15 +15,13 @@ _powerline_tmux_set_columns() { } _powerline_install_precmd() { - emulate zsh + emulate -L zsh for f in "${precmd_functions[@]}"; do if [[ "$f" = "_powerline_precmd" ]]; then return fi done chpwd_functions+=( _powerline_tmux_set_pwd ) - setopt promptpercent - setopt promptsubst if zmodload zsh/zpython &>/dev/null ; then zpython 'from powerline.bindings.zsh import setup as powerline_setup' zpython 'powerline_setup()' @@ -37,4 +35,6 @@ _powerline_install_precmd() { trap "_powerline_tmux_set_columns" SIGWINCH _powerline_tmux_set_columns +setopt promptpercent +setopt promptsubst _powerline_install_precmd