From time to time, we get conflicts when we merge SVN branches. Now I can automatically edit them:
alias edit_conflicts="${EDITOR:-vim} \$(svn status|grep '^C'|awk '{print \$2}')"
That uses whatever is in your EDITOR environment variable, but defaults to vim.
Re:awk
Ovid on 2008-04-28T09:32:24
Thanks. Works like a charm. I now have the following:
alias edit_conflicts="${EDITOR:-vim} \$(svn status|awk '/^C/{print \$2}')"
alias edit_code="${EDITOR:-vim} \$(svn st | awk '/^[AM].*p[ml]/{print \$2}')"
alias edit_tests="${EDITOR:-vim} \$(svn st | awk '/^[AM].*\.t$/{print \$2}')"