mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-12-18 13:41:56 +00:00
print new line(s) in precmd instead of embedding them in PROMPT
This commit is contained in:
parent
9c9039253c
commit
8554c755bd
1 changed files with 4 additions and 1 deletions
|
@ -3245,6 +3245,8 @@ _p9k_precmd() {
|
||||||
__p9k_new_pipestatus=($pipestatus)
|
__p9k_new_pipestatus=($pipestatus)
|
||||||
|
|
||||||
if ! zle; then
|
if ! zle; then
|
||||||
|
print -rn ${_p9k_prompt_newline:-}
|
||||||
|
|
||||||
if (( $+_p9k_real_zle_rprompt_indent )); then
|
if (( $+_p9k_real_zle_rprompt_indent )); then
|
||||||
if [[ -n $_p9k_real_zle_rprompt_indent ]]; then
|
if [[ -n $_p9k_real_zle_rprompt_indent ]]; then
|
||||||
ZLE_RPROMPT_INDENT=$_p9k_real_zle_rprompt_indent
|
ZLE_RPROMPT_INDENT=$_p9k_real_zle_rprompt_indent
|
||||||
|
@ -3532,6 +3534,7 @@ _p9k_init_vars() {
|
||||||
typeset -gi _p9k_g
|
typeset -gi _p9k_g
|
||||||
typeset -gi _p9k_ind
|
typeset -gi _p9k_ind
|
||||||
typeset -g _p9k_gap_pre
|
typeset -g _p9k_gap_pre
|
||||||
|
typeset -g _p9k_prompt_newline
|
||||||
typeset -g _p9k_prompt_prefix_left
|
typeset -g _p9k_prompt_prefix_left
|
||||||
typeset -g _p9k_prompt_prefix_right
|
typeset -g _p9k_prompt_prefix_right
|
||||||
typeset -g _p9k_prompt_suffix_left
|
typeset -g _p9k_prompt_suffix_left
|
||||||
|
@ -4061,7 +4064,7 @@ _p9k_init_prompt() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if (( _POWERLEVEL9K_PROMPT_ADD_NEWLINE )); then
|
if (( _POWERLEVEL9K_PROMPT_ADD_NEWLINE )); then
|
||||||
repeat $_POWERLEVEL9K_PROMPT_ADD_NEWLINE_COUNT _p9k_prompt_prefix_left+=$'\n'
|
repeat $_POWERLEVEL9K_PROMPT_ADD_NEWLINE_COUNT _p9k_prompt_newline+=$'\n'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
_p9k_t=($'\n' '')
|
_p9k_t=($'\n' '')
|
||||||
|
|
Loading…
Reference in a new issue