diff .shell.d/50.vcs_functions.sh @ 156:59ea03d7029a

vcs_functions: add a function to grab the path of the next unmerged file from git
author Augie Fackler <durin42@gmail.com>
date Tue, 24 Nov 2009 14:13:46 -0600
parents 5b0b8ad2cb2c
children f485c32913cd
line wrap: on
line diff
--- a/.shell.d/50.vcs_functions.sh
+++ b/.shell.d/50.vcs_functions.sh
@@ -193,6 +193,11 @@ function vcs_current_branch() {
     return 1
 }
 
+function git_next_unmerged_file() {
+  git status | grep unmerged | head -n 1 | sed 's/.*:   //'
+}
+alias git-next-unmerged-file=git_next_unmerged_file
+
 # change to the root dir of the current wc
 function wcroot() {
     local root=`hg root 2> /dev/null`