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

Re: [PATCH/RFC/WIP/POC] git-gui: grep prototype

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Nov 14, 2010, 23:48 UTC
Message-ID
<20101114234848.GB26104@burratino>
In-Reply-To
<AANLkTi=JR3vVnZ4Yz8o9MpZKiQ2_ASYxahbPNv8QACir@mail.gmail.com>
Bert Wesarg wrote:
Show 5 quoted lines
> Now I got your point. Maybe I should call GIT_EDITOR with $FILENAME as
> argument but with a new variable to indicate open'n'forget. So
> existing setups would always open the file (even without honoring the
> line number) and new/smart wrappers can honor the open'n'forget and
> line number flag.
Yes, I like the communication-via-environment idea.
In fact, there are multiple questions an editor might want answered:
1. GUI or no GUI?  (The combination of $DISPLAY and $(tty) often
   yields a reasonable answer.)
2. open'n'forget or wait for answer?  (gvim's --nofork option)
3. What line number?
4. regex to use to highlight matches?

Ideally $LINENUMBER would only be used represent (3), while a separate variable would indicate (2).

Previous: Bert WesargNext: Bert Wesarg
Message 6 of 9 in “git-gui: grep prototype”
  1. git-gui: grep prototypeBert Wesarg, Nov 14, 2010
  2. Jonathan NiederNov 14, 2010
  3. Bert WesargNov 14, 2010
  4. Jonathan NiederNov 14, 2010
  5. Bert WesargNov 14, 2010
  6. Jonathan NiederNov 14, 2010
  7. Bert WesargNov 19, 2010
  8. Jonathan NiederNov 19, 2010
  9. Bert WesargNov 19, 2010

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.