Created
July 1, 2011 01:43
-
-
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_}"?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 "$@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.