浏览代码

Display right prompt in theme chooser

I didn't found the way to right-align the right prompt
properly.

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>
Gaetan Semet 10 年之前
父节点
当前提交
0fcb7dd55e
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      tools/theme_chooser.sh

+ 2 - 1
tools/theme_chooser.sh

@@ -24,7 +24,8 @@ function theme_preview() {
     THEME_NAME=`echo $THEME | sed s/\.zsh-theme$//`
     print "$fg[blue]${(l.((${COLUMNS}-${#THEME_NAME}-5))..─.)}$reset_color $THEME_NAME $fg[blue]───$reset_color"
     source "$THEMES_DIR/$THEME"
-    print -P $PROMPT
+    cols=$(tput cols)
+    print -P "$PROMPT                                                                                      $RPROMPT"
 }
 
 function banner() {