浏览代码

Adding grt alias to the git plugin.

Josh Matthews 12 年之前
父节点
当前提交
7be660bf1d
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      plugins/git/git.plugin.zsh

+ 4 - 0
plugins/git/git.plugin.zsh

@@ -39,6 +39,10 @@ compdef _git gm=git-merge
 alias grh='git reset HEAD'
 alias grhh='git reset HEAD --hard'
 
+# Will cd into the top of the current repository
+# or submodule.
+alias grt='cd $(git rev-parse --show-toplevel || echo ".")'
+
 # Git and svn mix
 alias git-svn-dcommit-push='git svn dcommit && git push github master:svntrunk'
 compdef git-svn-dcommit-push=git