ITerm ZSH – Missing Right Prompt

itermterminalzsh

I'm using oh-my-zsh and iTerm2. I've also enabled the zsh-vim-mode plugin from oh-my-zsh. One of the annoyances I've encountered is my right prompt (RPS1 & RPROMPT) doesn't seem to show up. I'd like it to indicate what vim mode I'm currently in.

I'm using the robbyrussel theme. It seems my $RPS1 variable is set. I'm wondering if there's a configuration option I'm missing.


I'm running 10.7.

Same issue in 10.8.

Best Answer

Try wrapping your RPROMPT in single quotes. I've seen double quotes cause issues for others with their prompts before.

I would also ditch the precmd > setprompt process for the moment and just set RPROMPT directly to simplify for testing. Start with something like

precmd() {
  ...
}
PROMPT=$'\n$(rb_prompt) in $(directory_name) $(git_dirty)$(need_push)\n› '
RPROMPT='%{$fg_bold[cyan]%}$(todo)%{$reset_color%}'

and refine from there.