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

[PATCH 0/6] Teach '--column-number' to 'git-grep(1)'

From
Taylor Blau <me@ttaylorr.com>
Date
Apr 21, 2018, 03:45 UTC
Message-ID
<20180421034526.GA24606@syl.local>
Hi,

Attached is a series to add --column-number to 'git-grep(1)', and support jumping to the correct column when using Peff's 'git-jump'.

I have chosen -m as the short form of --column-number, because -c was taken, and -m is close to -n (the short form of --line-number).

The description in each patch is extensive, and can serve as a reference during review. Thank you in advance for your time, and--as always--I look forward to your feedback :-).

Thanks, Taylor

Taylor Blau (6):
  grep.c: take regmatch_t as argument in match_line()
  grep.c: take column number as argument to show_line()
  grep.[ch]: teach columnnum, color_columnno to grep_opt
  grep.c: display column number of first match
  builtin/grep.c: show column numbers via --column-number
  contrib/git-jump/git-jump: use column number when grep-ing
 Documentation/config.txt   |  5 +++++
 Documentation/git-grep.txt |  9 ++++++++-
 builtin/grep.c             |  1 +
 contrib/git-jump/git-jump  |  2 +-
 grep.c                     | 33 ++++++++++++++++++++++++---------
 grep.h                     |  2 ++
 t/t7810-grep.sh            | 22 ++++++++++++++++++++++
 7 files changed, 63 insertions(+), 11 deletions(-)

-- 2.17.0

Message 1 of 1 in “Teach '--column-number' to 'git-grep(1)'”
  1. 0/6 Teach '--column-number' to 'git-grep(1)'Taylor Blau, Apr 21, 2018

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.