News for hackers. Stuff that matters.
Re:Display your current git branch as part of your bash prompt by sandGorgon on Monday August 17, 2009 @02:22AM (#767485)
zsh does a much better job (with its right prompts and formatting) http://img194.imageshack.us/img194/2101/zsh1.png - this actually shows a git repository imported from svn

http://img40.imageshack.us/img40/3738/zsh2.png - this shows a regular svn repo

This is what you need in your zshrc

# precmd is called just before the prompt is printed function precmd() { title “zsh” “$USER@%m” “%55<…<%~” psvar=() vcs_info [[ -n $vcs_info_msg_0_ ]] && psvar[1]=”$vcs_info_msg_0_” }

vcs_info export RPS1=”${YELLOW}%1v${NORM}”

There are no comments on this comment yet.