Reset emulate call:

- only emulate -L causes options to be restore after function call
- using setopt outside of functions does not reintroduce #342
This commit is contained in:
ZyX 2013-05-01 23:39:19 +04:00
parent 4d5d92dda2
commit 98b7ed2950
1 changed files with 3 additions and 3 deletions

View File

@ -15,15 +15,13 @@ _powerline_tmux_set_columns() {
} }
_powerline_install_precmd() { _powerline_install_precmd() {
emulate zsh emulate -L zsh
for f in "${precmd_functions[@]}"; do for f in "${precmd_functions[@]}"; do
if [[ "$f" = "_powerline_precmd" ]]; then if [[ "$f" = "_powerline_precmd" ]]; then
return return
fi fi
done done
chpwd_functions+=( _powerline_tmux_set_pwd ) chpwd_functions+=( _powerline_tmux_set_pwd )
setopt promptpercent
setopt promptsubst
if zmodload zsh/zpython &>/dev/null ; then if zmodload zsh/zpython &>/dev/null ; then
zpython 'from powerline.bindings.zsh import setup as powerline_setup' zpython 'from powerline.bindings.zsh import setup as powerline_setup'
zpython 'powerline_setup()' zpython 'powerline_setup()'
@ -37,4 +35,6 @@ _powerline_install_precmd() {
trap "_powerline_tmux_set_columns" SIGWINCH trap "_powerline_tmux_set_columns" SIGWINCH
_powerline_tmux_set_columns _powerline_tmux_set_columns
setopt promptpercent
setopt promptsubst
_powerline_install_precmd _powerline_install_precmd