1
0
mirror of https://github.com/dcarrillo/prezto.git synced 2024-12-22 12:48:01 +00:00

Merge branch 'master' of git://github.com/robbyrussell/oh-my-zsh

This commit is contained in:
Toon Claes 2009-11-26 21:13:56 +01:00
commit 10491ecf13

View File

@ -12,3 +12,11 @@ parse_git_dirty () {
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/}
}