Browse code

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

Toon Claes authored on 26/11/2009 at 20:13:56
Showing 1 changed files
... ...
@@ -12,3 +12,11 @@ parse_git_dirty () {
12 12
   fi
13 13
 }
14 14
 
15
+#
16
+# Will return the current branch name
17
+# Usage example: git pull origin $(current_branch)
18
+#
19
+function current_branch() {
20
+  ref=$(git symbolic-ref HEAD 2> /dev/null) || return
21
+  echo ${ref#refs/heads/}
22
+}