浏览代码

hg_current_branch added to mercurial plugin

Lucas Sampaio 12 年之前
父节点
当前提交
51e05b7579
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6 0
      plugins/mercurial/mercurial.plugin.zsh

+ 6 - 0
plugins/mercurial/mercurial.plugin.zsh

@@ -12,3 +12,9 @@ alias hgp='hg push'
 alias hgs='hg status'
 # this is the 'git commit --amend' equivalent
 alias hgca='hg qimport -r tip ; hg qrefresh -e ; hg qfinish tip'
+
+function hg_current_branch() {
+  if [ -d .hg ]; then
+    echo hg:$(hg branch)
+  fi
+}