contrib/git-jump/git-jump: jump to exact location
Take advantage of 'git-grep(1)''s new option, '--column' in order to teach Peff's 'git-jump' script how to jump to the correct column for any given match. 'git-grep(1)''s output is in the correct format for Vim's jump list, so no additional cleanup is necessary. Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
6653fec3bb
commit
240cf2a257
@ -52,7 +52,7 @@ mode_merge() {
|
||||
# editor shows them to us in the status bar.
|
||||
mode_grep() {
|
||||
cmd=$(git config jump.grepCmd)
|
||||
test -n "$cmd" || cmd="git grep -n"
|
||||
test -n "$cmd" || cmd="git grep -n --column"
|
||||
$cmd "$@" |
|
||||
perl -pe '
|
||||
s/[ \t]+/ /g;
|
||||
|
Reference in New Issue
Block a user