Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Add hg_prompt_info function to mercurial plugin, make it consistent with git_prompt_info #1807

wants to merge 4 commits into from

6 participants


add hg_prompt_info function. Make it consistent with git_prompt_info. It uses the ZSH_THEME_HG_PROMPT_{PREFIX,SUFFIX,DIRTY,CLEAN} variables for customization.


+1 add this. @szferi does this work still?


I have the mercurial plugin enabled, but with all of the many themes I tried, the prompt is not altered at all.


yeah I have since looked at the provided with version, its so slow, make terminal slow so I turned it off. functionality already exists you are correct @AndydeCleyre


Hi there! @thejeshgn submitted a pull request a long time ago, can you check that out and see if it's any better? #1471


I do not understand why this is closed, as I appear to remain in the same position, with the plugin enabled and no effect on prompt. This is with oh-my-zsh 2566.3913106. Tested with these themes:

  • dst
  • steeef
  • kphoen
  • re5et
  • pmcgee
  • daveverwer
  • dpoggi
  • wezm+
  • pygmalion

Hi @AndydeCleyre, it seems I did not quite understand what you said. Does this pull request fix those themes for you?


No, it does not appear to have an effect. I copied that hg.zsh into my local /usr/share/oh-my-zsh/lib directory, sourced my .zshrc, entered an hg repository directory, and ran through those themes mentioned above.


I assume you have the mercurial plugin enabled. In that case, the mercurial plugin must be overwriting the functions defined in #1471's hg.zsh. Try disabling temporarily the mercurial plugin and check again.
Otherwise, I have to assume that this pull request (#1807) does fix things for you?

PS. don't just source your zshrc file, close and reopen the terminal.


Yes, as specified I did have the mercurial plugin enabled. In my previous tests I was using a fresh gnu screen instance each time. OK, I disabled the mercurial plugin but saw no change in behavior. So I re-enabled the mercurial plugin and replaced its content with this, but this also does not affect the prompt.


So this PR does nothing and as such it can be closed, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 23, 2012
  1. @wjlroe
Commits on May 12, 2013
  1. @szferi

    add hg_prompt_info function. Make it consistent with git_prompt_info.…

    szferi committed
    … It uses the ZSH_THEME_HG_PROMPT_{PREFIX,SUFFIX,DIRTY,CLEAN} variables for customization.
Commits on May 18, 2013
  1. @szferi

    Add completion for pip install -r

    szferi committed
  2. @szferi
This page is out of date. Refresh to see the latest.
Showing with 15 additions and 0 deletions.
  1. +14 −0 plugins/mercurial/mercurial.plugin.zsh
  2. +1 −0  plugins/pip/_pip
14 plugins/mercurial/mercurial.plugin.zsh
@@ -22,3 +22,17 @@ function hg_current_branch() {
echo hg:$(hg branch)
+function parse_hg_dirty() {
+ if [[ -n $(hg status -mard . 2> /dev/null) ]]; then
+ else
+ fi
+function hg_prompt_info() {
+ if [ -d .hg ]; then
+ echo "$ZSH_THEME_HG_PROMPT_PREFIX$(hg branch)$(parse_hg_dirty)$ZSH_THEME_HG_PROMPT_SUFFIX"
+ fi
1  plugins/pip/_pip
@@ -58,6 +58,7 @@ case "$words[1]" in
_arguments \
'(-U --upgrade)'{-U,--upgrade}'[upgrade all packages to the newest available version]' \
'(-f --find-links)'{-f,--find-links}'[URL for finding packages]' \
+ '(-r --requirement)'{-r,--requirement}'[Requirements file for packages to install]:File:_files' \
'(--no-deps --no-dependencies)'{--no-deps,--no-dependencies}'[iIgnore package dependencies]' \
'(--no-install)--no-install[only download packages]' \
'(--no-download)--no-download[only install downloaded packages]' \
Something went wrong with that request. Please try again.