3

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.

3

3 Answers 3

3
+100

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.

0
1

After investigating - I found a few things that fixed this:

  1. I had some oh-my-zsh plugins that were setting RPS1 instead of RPROMPT - it seems that setting both caused neither to be shown.
  2. Setting RPROMPT in precmd also caused it to disappear.
0

Make sure that $RPS1 or $RPROMPT is not defined in one of your plugins. For example, the plugin vi-mode defines $RPS1 inside an if statement. To test, disable ALL plugins inside your .zshrc and see if that fixes things.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .