Add more capable hg incoming and outgoing count handling
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.
Diff
1diff --git a/plugins/mercurial/mercurial.plugin.zsh b/plugins/mercurial/mercurial.plugin.zsh
2index de036e44d659df0c5e18005b6f594ef6eb93e021..c18aa726c49cd75b327ae4173a153cd4cb22c0af 100644
3--- a/plugins/mercurial/mercurial.plugin.zsh
4+++ b/plugins/mercurial/mercurial.plugin.zsh
5@@ -8,11 +8,9 @@ alias hgd='hg diff'
6 alias hged='hg diffmerge'
7 # pull and update
8 alias hgi='hg incoming'
9-alias hgic='hg incoming | grep "changeset" | wc -l'
10 alias hgl='hg pull -u'
11 alias hglr='hg pull --rebase'
12 alias hgo='hg outgoing'
13-alias hgoc='hg outgoing | grep 'changeset' | wc -l'
14 alias hgp='hg push'
15 alias hgs='hg status'
16 # this is the 'git commit --amend' equivalent
17@@ -55,3 +53,11 @@ function hg_dirty_choose {
18 function hg_dirty {
19 hg_dirty_choose $ZSH_THEME_HG_PROMPT_DIRTY $ZSH_THEME_HG_PROMPT_CLEAN
20 }
21+
22+function hgic() {
23+ hg incoming "$@" | grep "changeset" | wc -l
24+}
25+
26+function hgoc() {
27+ hg outgoing "$@" | grep "changeset" | wc -l
28+}