djl/vcprompt — pull request #33 by pjv (2012-11-02 15:22:34+00:00)
Title: Git indicators for un-pushed and un-pulled commits

Adds a new format option `-C` and token `%c` which, in a git repo with un-pushed commits on the current branch, will output a symbol (defaults to `'>'`). GIT ONLY.

Adds a new format option `-X` and token `%x` which, in a git repo with un-pushed commits on the current branch, will output the number of un-pushed commits. There is also a new formatting substitution option for `NUM_UNPUSHED` which can be any arbitrary string but MUST include the `'#'` symbol somewhere which is where the number will be replaced into the string. GIT ONLY.

Adds a new format option `-F` and token `%f` which, in a git repo with un-pushed commits on the current branch, will output a symbol (defaults to `'<'`). GIT ONLY.

Adds a new format option `-Y` and token `%y` which, in a git repo with un-pushed commits on the current branch, will output the number of un-pushed commits. There is also a new formatting substitution option for `NUM_UNPULLED` which can be any arbitrary string but MUST include the `'~'` symbol somewhere which is where the number will be replaced into the string. GIT ONLY.

here's what my prompt looks like using these options when my local master branch is 1 commit ahead and 1 commit behind origin on master:

`pjv-mbp:test2 |git| master >1 <1 [9e77273] * `

Actually, my prompt on OS X looks like this:
![pjv prompt](http://i.imgur.com/CpBsd.png)
... but I didn't think the special characters would translate for everyone.