added variable to have rprompt on the newline

pull/22/head
Matthías Páll Gissurarson 9 years ago
parent 6d3899b6e3
commit 47eb8f10ac

@ -901,6 +901,7 @@ powerlevel9k_prepare_prompts() {
if [[ "$POWERLEVEL9K_PROMPT_ON_NEWLINE" == true ]]; then if [[ "$POWERLEVEL9K_PROMPT_ON_NEWLINE" == true ]]; then
PROMPT="$(print_icon 'MULTILINE_FIRST_PROMPT_PREFIX')%{%f%b%k%}$(build_left_prompt) PROMPT="$(print_icon 'MULTILINE_FIRST_PROMPT_PREFIX')%{%f%b%k%}$(build_left_prompt)
$(print_icon 'MULTILINE_SECOND_PROMPT_PREFIX')" $(print_icon 'MULTILINE_SECOND_PROMPT_PREFIX')"
if [[ "$POWERLEVEL9K_RPROMPT_ON_NEWLINE" != true ]]; then
# The right prompt should be on the same line as the first line of the left # The right prompt should be on the same line as the first line of the left
# prompt. To do so, there is just a quite ugly workaround: Before zsh draws # prompt. To do so, there is just a quite ugly workaround: Before zsh draws
# the RPROMPT, we advise it, to go one line up. At the end of RPROMPT, we # the RPROMPT, we advise it, to go one line up. At the end of RPROMPT, we
@ -909,6 +910,10 @@ $(print_icon 'MULTILINE_SECOND_PROMPT_PREFIX')"
local LC_ALL="" LC_CTYPE="en_US.UTF-8" # Set the right locale to protect special characters local LC_ALL="" LC_CTYPE="en_US.UTF-8" # Set the right locale to protect special characters
RPROMPT_PREFIX='%{'$'\e[1A''%}' # one line up RPROMPT_PREFIX='%{'$'\e[1A''%}' # one line up
RPROMPT_SUFFIX='%{'$'\e[1B''%}' # one line down RPROMPT_SUFFIX='%{'$'\e[1B''%}' # one line down
else
RPROMPT_PREFIX=''
RPROMPT_SUFFIX=''
fi
else else
PROMPT="%{%f%b%k%}$(build_left_prompt)" PROMPT="%{%f%b%k%}$(build_left_prompt)"
RPROMPT_PREFIX='' RPROMPT_PREFIX=''

Loading…
Cancel
Save