# HG changeset patch # User Augie Fackler # Date 1259093626 21600 # Node ID 59ea03d7029acd0ab3b493c9402cb7222d4ec0c2 # Parent 8b0932adcaf18d9956b8a6851386f05c331a25ba vcs_functions: add a function to grab the path of the next unmerged file from git diff --git a/.shell.d/50.vcs_functions.sh b/.shell.d/50.vcs_functions.sh --- 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`