Re: [PATCH v4 7/7] contrib/git-jump/git-jump: jump to match column in addition to line

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 5 May 2018 at 04:43, Taylor Blau <me@xxxxxxxxxxxx> wrote:
> 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.

> diff --git a/contrib/git-jump/README b/contrib/git-jump/README
> index 4484bda410..7630e16854 100644

>  # use the silver searcher for git jump grep
> -git config jump.grepCmd "ag --column"
> +git config jump.grepCmd "ag"

I think this change originates from Ævar's comment that it "also makes
sense to update the example added in 007d06aa57 [...] which seems to
have added jump.grepCmd as a workaround for not having this" [1].

Somehow though, this approach seems a bit backwards to me. I do believe
that your series reduces the reasons for using `jump.grepCmd`, but
regressing this example usage of `jump.grepCmd` seems a bit hostile. If
someone wants to use `ag`, wouldn't we want to hint that they will
probably want to use `--column`?

Is there some other `ag --column --foo` that we can give, where `--foo`
is not yet in `git grep`? ;-)

Martin

[1] https://public-inbox.org/git/874lk2e4he.fsf@xxxxxxxxxxxxxxxxxxx/




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux