Mercurial > dotfiles
comparison .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 |
comparison
equal
deleted
inserted
replaced
155:8b0932adcaf1 | 156:59ea03d7029a |
---|---|
191 return 0 | 191 return 0 |
192 fi | 192 fi |
193 return 1 | 193 return 1 |
194 } | 194 } |
195 | 195 |
196 function git_next_unmerged_file() { | |
197 git status | grep unmerged | head -n 1 | sed 's/.*: //' | |
198 } | |
199 alias git-next-unmerged-file=git_next_unmerged_file | |
200 | |
196 # change to the root dir of the current wc | 201 # change to the root dir of the current wc |
197 function wcroot() { | 202 function wcroot() { |
198 local root=`hg root 2> /dev/null` | 203 local root=`hg root 2> /dev/null` |
199 if [ x$root != 'x' ] ; then | 204 if [ x$root != 'x' ] ; then |
200 cd $root | 205 cd $root |