Added mercurial library

The added library parses output of the hg (mercurial) command, and outputs
the same variables (which should be customized by theme) in your prompt.
I added an example of these variables to michelebologna theme.

This patch should uniform all the behaviour of all themes regarding mercurial.
In fact, some themes implement their own hg parsing *inside* the theme.
This should be better implemented in a library, as happens with git library.
This commit is contained in:
Michele Bologna 2015-09-22 16:36:31 +02:00
commit 194c5b1ca3
3 changed files with 39 additions and 1 deletions

View file

@ -10,7 +10,7 @@
# Dummy implementations that return false to prevent command_not_found
# errors with themes, that implement these functions
# Real implementations will be used when the respective plugins are loaded
function chruby_prompt_info hg_prompt_info pyenv_prompt_info \
function chruby_prompt_info pyenv_prompt_info \
rbenv_prompt_info svn_prompt_info vi_mode_prompt_info \
virtualenv_prompt_info {
return 1