aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominik Ritter <dritter03@googlemail.com>2015-06-05 20:18:07 +0300
committerDominik Ritter <dritter03@googlemail.com>2015-06-05 20:18:07 +0300
commit2798a9d38e1a7ee04cc831142725952a083b7e07 (patch)
tree9d92af1355f419d26b9884f8ea1aeece62450a15
parentd8d9e6cfda414c9fa95a770b8e8fbf42499f3d43 (diff)
parentf7cb946898d501a273b4e193910dd5cac6ac22f1 (diff)
Merge branch 'master' into dritter/font_mode
-rw-r--r--powerlevel9k.zsh-theme10
1 files changed, 9 insertions, 1 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme
index 92bbf405..04e7183d 100644
--- a/powerlevel9k.zsh-theme
+++ b/powerlevel9k.zsh-theme
@@ -576,7 +576,15 @@ precmd() {
if [[ "$POWERLEVEL9K_PROMPT_ON_NEWLINE" == true ]]; then
PROMPT='╭─%{%f%b%k%}$(build_left_prompt)
╰─ '
+ # 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 the RPROMPT,
+ # we advise it, to go one line up. At the end of RPROMPT, we advise it to go one
+ # line down. See http://superuser.com/questions/357107/zsh-right-justify-in-ps1
+ RPROMPT_PREFIX='%{'$'\e[1A''%}' # one line up
+ RPROMPT_SUFFIX='%{'$'\e[1B''%}' # one line down
else
PROMPT='%{%f%b%k%}$(build_left_prompt) '
+ RPROMPT_PREFIX=''
+ RPROMPT_SUFFIX=''
fi
-RPROMPT='%{%f%b%k%}$(build_right_prompt)%{$reset_color%}'
+RPROMPT=$RPROMPT_PREFIX'%{%f%b%k%}$(build_right_prompt)%{$reset_color%}'$RPROMPT_SUFFIX