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

Re: [PATCH 0/4] grep: add more information to hunk separators

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 26, 2012, 18:05 UTC
Message-ID
<7vk427p79z.fsf@alter.siamese.dyndns.org>
In-Reply-To
<4F70966B.4050107@lsrfire.ath.cx>
René Scharfe <rene.scharfe@lsrfire.ath.cx> writes:
> Human readers can differentiate between contents and heading by color;
> separators are cyan by default.
OK.
> A separate frontend would probably have to implement match
> highlighting again.  That's not too hard, but a bit sad.

Yeah, but at the same time, a separate front-end could do a lot more than just grep. Letting the user pick a function name from the current output and run grep again, letting the user highlight the line range and run blame (or "Linus's ultimate content tracking tool"), etc.

> ...  But I think the idea to deduplicate the meta-information and give
> found content more screen real estate is a good one in general.

Yeah, I found the "sound of one hand clapping" in your other message somewhat intriguing ;-).

Previous: René ScharfeNext: Bert Wesarg
Message 8 of 15 in “grep: add more information to hunk separators”
  1. 0/4 grep: add more information to hunk separatorsMark Lodato, Mar 26, 2012
  2. 1/4 grep doc: add --break / --heading / -W to synopsisMark Lodato, Mar 26, 2012
  3. 2/4 add tests for grep --heading with contextMark Lodato, Mar 26, 2012
  4. 3/4 grep: move code to print hunk markers after headingMark Lodato, Mar 26, 2012
  5. 4/4 grep: add --hunk-heading optionMark Lodato, Mar 26, 2012
  6. Junio C HamanoMar 26, 2012
  7. René ScharfeMar 26, 2012
  8. Junio C HamanoMar 26, 2012
  9. Bert WesargMar 26, 2012
  10. René ScharfeMar 26, 2012
  11. Junio C HamanoMar 26, 2012
  12. René ScharfeMar 26, 2012
  13. Junio C HamanoMar 26, 2012
  14. 5/4 move sane_truncate_line to utf8_truncate_lineMark Lodato, Mar 27, 2012
  15. 6/4 add grep.hunkHeadingFunction optionMark Lodato, Mar 27, 2012

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.