Display version control repository info in your shell prompt
Provide version control info in shell prompts
vcprompt
$ export PS1='[$(vcprompt)] \u@\h:\w$ '
$ PROMPT='%F{blue}$(vcprompt)%f %# '
$ vcprompt -f '%b:%r' # in hg repository