use tmux bypass in iterm2 integration only if _z4h_iterm_cmd is defined

pull/1161/head
Roman Perepelitsa 4 years ago
parent c7914c051d
commit 2c3bcd8b5d

@ -7840,7 +7840,7 @@ _p9k_init_prompt() {
fi fi
if [[ $ITERM_SHELL_INTEGRATION_INSTALLED == Yes ]]; then if [[ $ITERM_SHELL_INTEGRATION_INSTALLED == Yes ]]; then
if (( _z4h_can_save_restore_screen == 1 )); then if (( $+_z4h_iterm_cmd && _z4h_can_save_restore_screen == 1 )); then
_p9k_prompt_prefix_left+=$'%{\ePtmux;\e\e]133;A\a\e\\%}' _p9k_prompt_prefix_left+=$'%{\ePtmux;\e\e]133;A\a\e\\%}'
_p9k_prompt_suffix_left+=$'%{\ePtmux;\e\e]133;B\a\e\\%}' _p9k_prompt_suffix_left+=$'%{\ePtmux;\e\e]133;B\a\e\\%}'
else else
@ -7946,7 +7946,8 @@ _p9k_must_init() {
_p9k__param_pat+=$'${(M)VTE_VERSION:#(<1-4602>|4801)}\1$DEFAULT_USER\1$P9K_SSH\1$+commands[uname]\1' _p9k__param_pat+=$'${(M)VTE_VERSION:#(<1-4602>|4801)}\1$DEFAULT_USER\1$P9K_SSH\1$+commands[uname]\1'
_p9k__param_pat+=$'$__p9k_root_dir\1$functions[p10k-on-init]\1$functions[p10k-on-pre-prompt]\1' _p9k__param_pat+=$'$__p9k_root_dir\1$functions[p10k-on-init]\1$functions[p10k-on-pre-prompt]\1'
_p9k__param_pat+=$'$functions[p10k-on-post-widget]\1$functions[p10k-on-post-prompt]\1' _p9k__param_pat+=$'$functions[p10k-on-post-widget]\1$functions[p10k-on-post-prompt]\1'
_p9k__param_pat+=$'$+commands[git]\1$terminfo[colors]' _p9k__param_pat+=$'$+commands[git]\1$terminfo[colors]\1${+_z4h_iterm_cmd}\1'
_p9k__param_pat+=$'$_z4h_can_save_restore_screen'
local MATCH local MATCH
IFS=$'\1' _p9k__param_pat+="${(@)${(@o)parameters[(I)POWERLEVEL9K_*]}:/(#m)*/\${${(q)MATCH}-$IFS\}}" IFS=$'\1' _p9k__param_pat+="${(@)${(@o)parameters[(I)POWERLEVEL9K_*]}:/(#m)*/\${${(q)MATCH}-$IFS\}}"
IFS=$'\2' _p9k__param_sig="${(e)_p9k__param_pat}" IFS=$'\2' _p9k__param_sig="${(e)_p9k__param_pat}"
@ -8010,7 +8011,7 @@ function _p9k_init_cacheable() {
_p9k_transient_prompt+='${:-"'$_p9k__ret'"}' _p9k_transient_prompt+='${:-"'$_p9k__ret'"}'
_p9k_transient_prompt+=')%b%k%f%s%u ' _p9k_transient_prompt+=')%b%k%f%s%u '
if [[ $ITERM_SHELL_INTEGRATION_INSTALLED == Yes ]]; then if [[ $ITERM_SHELL_INTEGRATION_INSTALLED == Yes ]]; then
if (( _z4h_can_save_restore_screen == 1 )); then if (( $+_z4h_iterm_cmd && _z4h_can_save_restore_screen == 1 )); then
_p9k_transient_prompt=$'%{\ePtmux;\e\e]133;A\a\e\\%}'$_p9k_transient_prompt$'%{\ePtmux;\e\e]133;B\a\e\\%}' _p9k_transient_prompt=$'%{\ePtmux;\e\e]133;A\a\e\\%}'$_p9k_transient_prompt$'%{\ePtmux;\e\e]133;B\a\e\\%}'
else else
_p9k_transient_prompt=$'%{\e]133;A\a%}'$_p9k_transient_prompt$'%{\e]133;B\a%}' _p9k_transient_prompt=$'%{\e]133;A\a%}'$_p9k_transient_prompt$'%{\e]133;B\a%}'

Loading…
Cancel
Save