diff options
author | Chris Krycho <github@chriskrycho.com> | 2013-06-25 15:52:26 -0300 |
---|---|---|
committer | Chris Krycho <github@chriskrycho.com> | 2013-06-25 15:52:26 -0300 |
commit | f25e2d2856281698914f21f7d22f84ae7e421f39 (patch) | |
tree | b322402bead062ad2f06a91bb56036c445fdca29 /plugins/mercurial | |
parent | b9baf377390dc79826bf10977d002a380c64ee74 (diff) | |
download | zsh-f25e2d2856281698914f21f7d22f84ae7e421f39.tar.gz zsh-f25e2d2856281698914f21f7d22f84ae7e421f39.tar.bz2 zsh-f25e2d2856281698914f21f7d22f84ae7e421f39.zip |
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.
Diffstat (limited to 'plugins/mercurial')
-rw-r--r-- | plugins/mercurial/mercurial.plugin.zsh | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/plugins/mercurial/mercurial.plugin.zsh b/plugins/mercurial/mercurial.plugin.zsh index de036e44d..c18aa726c 100644 --- a/plugins/mercurial/mercurial.plugin.zsh +++ b/plugins/mercurial/mercurial.plugin.zsh @@ -8,11 +8,9 @@ alias hgd='hg diff' alias hged='hg diffmerge' # pull and update alias hgi='hg incoming' -alias hgic='hg incoming | grep "changeset" | wc -l' alias hgl='hg pull -u' alias hglr='hg pull --rebase' alias hgo='hg outgoing' -alias hgoc='hg outgoing | grep 'changeset' | wc -l' alias hgp='hg push' alias hgs='hg status' # this is the 'git commit --amend' equivalent @@ -55,3 +53,11 @@ function hg_dirty_choose { function hg_dirty { hg_dirty_choose $ZSH_THEME_HG_PROMPT_DIRTY $ZSH_THEME_HG_PROMPT_CLEAN } + +function hgic() { + hg incoming "$@" | grep "changeset" | wc -l +} + +function hgoc() { + hg outgoing "$@" | grep "changeset" | wc -l +} |