aboutsummaryrefslogtreecommitdiff
path: root/powerlevel9k.zsh-theme
diff options
context:
space:
mode:
authorromkatv <roman.perepelitsa@gmail.com>2019-03-16 16:10:19 +0300
committerromkatv <roman.perepelitsa@gmail.com>2019-03-16 16:10:19 +0300
commitd8ef83b59a22f124276fae57bfcb4df43c709afb (patch)
tree56332cf71ad932513f9de2ae75d7f5a67cb4a643 /powerlevel9k.zsh-theme
parent0103fe8d63c266d044b98dae27cd9819fc3ad176 (diff)
be more aggressive in attempt to maintain correct prompt options
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rwxr-xr-xpowerlevel9k.zsh-theme9
1 files changed, 5 insertions, 4 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme
index 37366fc9..9821d500 100755
--- a/powerlevel9k.zsh-theme
+++ b/powerlevel9k.zsh-theme
@@ -1991,6 +1991,8 @@ typeset -g _P9K_RIGHT_SUFFIX
set_default POWERLEVEL9K_DISABLE_RPROMPT false
typeset -fH _p9k_set_prompt() {
+ emulate -L zsh
+
_P9K_PROMPT=''
build_left_prompt
PROMPT=$_P9K_LEFT_PREFIX$_P9K_PROMPT$_P9K_LEFT_SUFFIX
@@ -2024,7 +2026,9 @@ powerlevel9k_prepare_prompts() {
_P9K_PIPE_EXIT_CODES=( "$pipestatus[@]" )
_P9K_COMMAND_DURATION=$((EPOCHREALTIME - _P9K_TIMER_START))
- emulate -L zsh
+ unsetopt local_options
+ prompt_opts=(cr percent sp subst)
+ setopt nopromptbang prompt{cr,percent,sp,subst}
_p9k_init
_P9K_TIMER_START=1e10
@@ -2276,9 +2280,6 @@ typeset -gi _P9K_ENABLED=0
prompt_powerlevel9k_setup() {
prompt_powerlevel9k_teardown
- prompt_opts=(cr percent sp subst)
- setopt nopromptbang prompt{cr,percent,sp,subst}
-
add-zsh-hook precmd powerlevel9k_prepare_prompts
add-zsh-hook preexec powerlevel9k_preexec