git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] contrib/git-jump: allow to configure the grep command

From
Jeff King <peff@peff.net>
Date
Nov 20, 2017, 19:20 UTC
Message-ID
<20171120192011.i3nsulvnswshwdlr@sigill.intra.peff.net>
In-Reply-To
<20171119230536.1628-1-dev+git@drbeat.li>
On Mon, Nov 20, 2017 at 12:05:36AM +0100, Beat Bolli wrote:
> Add the configuration option "jump.grepCmd" that allows to configure the
> command that is used to search in grep mode. This allows the users of
> git-jump to use ag(1) or ack(1) as search engines.

This patch looks good to me. The user needs to be careful to use some option that shows the line number, but that's hopefully obvious from your example.

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

I wondered what "vim -q" would do with the --column output. Quite nicely, it puts the cursor right where you'd want it to be. I'm tempted to teach "git grep" the same option. ;)

-Peff
Previous: Junio C Hamano
Message 6 of 6 in “contrib/git-jump: allow to configure the grep command”
  1. contrib/git-jump: allow to configure the grep commandBeat Bolli, Nov 19, 2017
  2. Junio C HamanoNov 20, 2017
  3. Jeff KingNov 20, 2017
  4. Jonathan NiederNov 20, 2017
  5. Junio C HamanoNov 21, 2017
  6. Jeff KingNov 20, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.