diff --git a/zsh/prompt.zsh b/zsh/prompt.zsh index 0acc5d6..4a22f2d 100644 --- a/zsh/prompt.zsh +++ b/zsh/prompt.zsh @@ -2,10 +2,6 @@ # only show RPROMPT on the current prompt setopt transient_rprompt # only show the rprompt on the current prompt -# set RPROMPT_INDENT to zero in order to remove the useless space on the bottom -# right of the prompt. -ZLE_RPROMPT_INDENT=0 - # ===== set the prompt zshrc_prompt_precmd() { @@ -78,7 +74,8 @@ zshrc_prompt_precmd() { # suffix characters in first and second line local top_suffix="%F{cyan}${top_right_corner}%f" - local bottom_suffix="%F{cyan}${bottom_right_corner}%f" + # use %{ .. %} for bottom_right_corner to remove useless space after RPROMPT + local bottom_suffix="%F{cyan}%{${bottom_right_corner}%}%f" # combine them to create the prompt local top_left=""