From 161c995625fc655eb3228a88f5ce1ad79fd1ede0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20H=C3=B6ltje?= Date: Thu, 4 May 2017 02:44:37 -0400 Subject: [PATCH] newline: can't work with right side --- README.md | 5 +++-- powerlevel9k.zsh-theme | 6 ++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index b52edeb7..bc9b4462 100644 --- a/README.md +++ b/README.md @@ -447,8 +447,9 @@ segment will not be displayed. Puts a newline in your prompt so you can continue using segments on the next line. -This allows you to use segments on both lines, unlike `POWERLEVEL9K_PROMPT_ON_NEWLINE` and -`POWERLEVEL9K_RPROMPT_ON_NEWLINE`. +This allows you to use segments on both lines, unlike `POWERLEVEL9K_PROMPT_ON_NEWLINE`. + +This only works on the left side. On the right side it does nothing. ##### rbenv diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme index 83c5966e..bcce12f4 100755 --- a/powerlevel9k.zsh-theme +++ b/powerlevel9k.zsh-theme @@ -339,17 +339,15 @@ prompt_background_jobs() { # A newline in your prompt, so you can segments on multiple lines. prompt_newline() { - local lws rws + local lws + [[ "$1" == "right" ]] && return lws=$POWERLEVEL9K_WHITESPACE_BETWEEN_LEFT_SEGMENTS - rws=$POWERLEVEL9K_WHITESPACE_BETWEEN_RIGHT_SEGMENTS POWERLEVEL9K_WHITESPACE_BETWEEN_LEFT_SEGMENTS= - POWERLEVEL9K_WHITESPACE_BETWEEN_RIGHT_SEGMENTS= "$1_prompt_segment" \ "$0" \ "$2" \ "NONE" "NONE" $'\n' POWERLEVEL9K_WHITESPACE_BETWEEN_LEFT_SEGMENTS=$lws - POWERLEVEL9K_WHITESPACE_BETWEEN_RIGHT_SEGMENTS=$rws } # Segment that indicates usage level of current partition.