Update: This post is out-of-date.
Please head over to the newest post for Powerlevel9k, here.
In the post where I first announced the powerlevel9k Oh-My-Zsh theme, I lamented the fact that the
powerlevel9k theme displays less information about git repositories while you were working in them than does my previous theme, hackersaurus. At the time, I was under the impression that the
vcs_info module, which I had migrated to for
powerlevel9k, actually couldn't provide the extra information.
Specifically, in addition to the git info
powerlevel9k already provided, it now also displays:
- Special action-state information (e.g., rebasing or merging).
- Lets you know if you are ahead or behind your remote in commits.
- Displays the remote branch if it doesn't match your local.
- Shows tag information if you have checked out a tag.
The new code is taken almost line-for-line from tupton's excellent config, which is worth looking at in its own right.
Here is an image demonstrating some of the new information. In the first line, you can see that I'm ahead of the remote by three commits. In the second line, you can see that I'm in the middle of a merge.
While I was incorporating the new features, I also took the opportunity to clean up a lot of other stuff. The theme code is now much leaner.