If a user sets ZSH_THEME_HG_PROMPT_* as the following, he ends up with
%{$reset_color%} resetting the bold style of last character ")" because
_SUFFIX was expanded before calling hg_dirty():
ZSH_THEME_HG_PROMPT_PREFIX="%{$fg_bold[blue]%}hg:(%{$fg[white]%}"
ZSH_THEME_HG_PROMPT_SUFFIX="%{$reset_color%}"
ZSH_THEME_HG_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗%{$reset_color%}"
ZSH_THEME_HG_PROMPT_CLEAN="%{$fg[blue]%})"
With this patch, the variable ZSH_THEME_HG_PROMPT_SUFFIX is lastly
displayed, following the same order as in git_prompt_info(),
i.e. <prefix><dirty><suffix>.
The original hgic and hgoc aliases worked well for the default path, but attempting to call them with a different path failed. I created functions to handle them instead.
implement in_hg(), hg_get_branch_name(), hg_prompt_info(), and hg_dirty() for the mercurial plugin
named functions similar to subversion plugin, to give theme maintainers an easier life
The -v flag for these commands really isn't very useful. It will
output some information about the hooks it is running, but that is
generally not useful and just noisy. The desire to add -v to these
commands is exceptional and IMHO it's better to make the common
case of not seeing those messages the supported behavior.