summaryrefslogtreecommitdiff
path: root/internal/p10k.zsh
diff options
context:
space:
mode:
authorromkatv <roman.perepelitsa@gmail.com>2019-11-13 17:01:00 +0300
committerromkatv <roman.perepelitsa@gmail.com>2019-11-13 17:01:00 +0300
commitc3685015e6e0fa800477000fcc38f4cfb54c56ac (patch)
tree4e425f89fa4863aff4ddeb200c7e6188efc4de63 /internal/p10k.zsh
parentc9b36cd32e66ce42952350c945ccade0b8571f36 (diff)
attempt to fix iterm2 intergration
Diffstat (limited to 'internal/p10k.zsh')
-rw-r--r--internal/p10k.zsh15
1 files changed, 15 insertions, 0 deletions
diff --git a/internal/p10k.zsh b/internal/p10k.zsh
index a6bb0ddc..8124c49e 100644
--- a/internal/p10k.zsh
+++ b/internal/p10k.zsh
@@ -5257,6 +5257,7 @@ _p9k_init_prompt() {
if [[ $ITERM_SHELL_INTEGRATION_INSTALLED == Yes ]]; then
_p9k_prompt_prefix_left+=$'%{\e]133;A\a%}'
+ _p9k_prompt_suffix_left+=$'%{\e]133;B\a%}'
fi
( _p9k_segment_in_use time && (( _POWERLEVEL9K_TIME_UPDATE_ON_COMMAND )) )
@@ -5573,6 +5574,18 @@ _p9k_init() {
_p9k_init_display
+ if (( $+functions[iterm2_decorate_prompt] )); then
+ _p9k__iterm2_decorate_prompt=$functions[iterm2_decorate_prompt]
+ function iterm2_decorate_prompt() {
+ typeset -g ITERM2_PRECMD_PS1=
+ typeset -g ITERM2_SHOULD_DECORATE_PROMPT=
+ }
+ fi
+ if (( $+functions[iterm2_precmd] )); then
+ _p9k__iterm2_precmd=$functions[iterm2_precmd]
+ functions[iterm2_precmd]='local _p9k_status=$?; zle || return; () { return $_p9k_status; }; '$_p9k__iterm2_precmd
+ fi
+
if _p9k_segment_in_use todo; then
local todo=$commands[todo.sh]
if [[ -n $todo ]]; then
@@ -5657,6 +5670,8 @@ _p9k_deinit() {
(( $+functions[gitstatus_stop] )) && gitstatus_stop POWERLEVEL9K
_p9k_deinit_async_pump
(( _p9k__dump_pid )) && wait $_p9k__dump_pid 2>/dev/null
+ (( $+_p9k__iterm2_precmd )) && functions[iterm2_precmd]=$_p9k__iterm2_precmd
+ (( $+_p9k__iterm2_decorate_prompt )) && functions[iterm2_decorate_prompt]=$_p9k__iterm2_decorate_prompt
unset -m '(_POWERLEVEL9K_|P9K_|_p9k_)*~(P9K_SSH|P9K_TTY)'
}