Re: [PATCH v4 7/7] contrib/git-jump/git-jump: jump to match column in addition to line
- From
- Martin Ågren <martin.agren@gmail.com>
- Date
- May 6, 2018, 14:43 UTC
- Message-ID
- <CAN0heSoiOd-oXj_0kJbc2qQCQAortCuXERpxF4Cro8pi4x1eBQ@mail.gmail.com>
- In-Reply-To
- <326d07b48654ab2a64d09eb17d995a26d06bcdb1.1525488108.git.me@ttaylorr.com>
On 5 May 2018 at 04:43, Taylor Blau <me@ttaylorr.com> wrote:
Show 6 quoted lines
> 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@evledraar.gmail.com/