Skip to content

Instantly share code, notes, and snippets.

@hamsolodev
Created July 1, 2011 01:43
Show Gist options
  • Save hamsolodev/1057703 to your computer and use it in GitHub Desktop.
Save hamsolodev/1057703 to your computer and use it in GitHub Desktop.
why is my RHS zsh prompt always the literal string "${vcs_info_msg_0_}"?
autoload -Uz vcs_info
autoload -U colors && colors
my_prompt_setup() {
zstyle ':vcs_info:*' enable git
zstyle ':vcs_info:git:*' check-for-changes true
precmd() {
vcs_info
}
PROMPT="%{$fg[blue]%}(%{$reset_color%}%{$fg[red]%}%m%{$reset_color%}%{$fg[yellow]%}:%{$reset_color%}%{$fg[green]%}%1d%{$reset_color%}%{$fg[blue]%})%{$reset_color%}%# "
RPROMPT='${vcs_info_msg_0_}'
}
my_prompt_setup "$@"
@adam000
Copy link

adam000 commented Oct 29, 2013

I don't know if you've ever solved this, as there's no indication that you have, but according to this, you need to add setopt promptsubst so that prompt substitution will occur.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment