From 58377b2766dbb5adcf26303908519530b17e622f Mon Sep 17 00:00:00 2001 From: Logan Brown Date: Mon, 19 Feb 2018 17:22:14 -0700 Subject: [PATCH] feature: add custom number of newlines after prompt --- powerlevel9k.zsh-theme | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme index c32ccd48..32d7ed1b 100755 --- a/powerlevel9k.zsh-theme +++ b/powerlevel9k.zsh-theme @@ -1620,9 +1620,14 @@ $(print_icon 'MULTILINE_LAST_PROMPT_PREFIX')' if [[ "$POWERLEVEL9K_DISABLE_RPROMPT" != true ]]; then RPROMPT='$RPROMPT_PREFIX%f%b%k$(build_right_prompt)%{$reset_color%}$RPROMPT_SUFFIX' fi + NEWLINE=' ' - [[ $POWERLEVEL9K_PROMPT_ADD_NEWLINE == true ]] && PROMPT="$NEWLINE$PROMPT" + if [[ $POWERLEVEL9K_PROMPT_ADD_NEWLINE == true ]]; then + NEWLINES="" + repeat ${POWERLEVEL9K_PROMPT_ADD_NEWLINE_COUNT:-1} { NEWLINES+=$NEWLINE } + PROMPT="$NEWLINES$PROMPT" + fi } set_default POWERLEVEL9K_IGNORE_TERM_COLORS false