Moving current_branch() to git plugin

This commit is contained in:
Robby Russell committed 2010-06-03 12:56:11 -07:00
1 parent 89bd2bf317
commit 27904c117c
2 files changed
+10 -9

No files matched your search

-9
View File
@@ -11,12 +11,3 @@ parse_git_dirty () {
echo "$ZSH_THEME_GIT_PROMPT_CLEAN"
fi
}
#
# Will return the current branch name
# Usage example: git pull origin $(current_branch)
#
function current_branch() {
ref=$(git symbolic-ref HEAD 2> /dev/null) || return
echo ${ref#refs/heads/}
}