Jesus Rodriguez recently posted about putting git information into his shell prompt with the mention that bash is the one and only shell ("In bash (is there really any other shell?)…"). I'd like to present my prompt as proof that bash is not the end-all-be-all shell. I have been using zsh for a while now and have had information on the VCS for the repository I'm currently browsing for a while. For git it usually looks like this:
while for Mercurial it looks like this:
and for Subversion:
This is all possible due to the awesome vcs_info plug-in that zsh has available. It includes support for all of the version control systems I use (git, cvs, svn) as well as those I encounter in other projects (hg, darcs) that I have checkouts of laying around.
I also like to have my prompt start at a consistent spot in the shell, so I put the date and current directory on the line before the actual prompt. Currently the vcs_info is set as RPROMPT since I've tried and failed to get it to right align on the first line (I wish zsh had %= as a filler space similar to screen).