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

Re: [PATCH/TOY] Shortcuts to quickly refer to a commit name with keyboard

From
Jeff King <peff@peff.net>
Date
Jan 21, 2017, 14:03 UTC
Message-ID
<20170121140325.uicd2nxtuhn3i5vy@sigill.intra.peff.net>
In-Reply-To
<CACsJy8DxCPCXUeEoR1pQBCNqYOHjpgfLy_vgqsK1H=C0Mf=L8g@mail.gmail.com>
On Sat, Jan 21, 2017 at 07:44:05PM +0700, Duy Nguyen wrote:
> You just gave me a reason to rebuild urxvt with perl support. It
> solves my problem with SHA-1 nicely (and fixes another problem with
> very large counter in my approach, when you scroll git-log further
> down, because I can't know what's on screen or already scrolled past).

Note that even without my module, you can probably use the "matcher" extension which is included with urxvt to do something similar (it can handle arbitrary numbers of matching regexps).

The things I like about my module (and why I bothered to write it) are:
  - it does nothing at all until you trigger it, so you don't have to
    worry about the cost of your regexes, or how ugly false positives
    will look when underlined
  - I think the hint mode is much better for keyboard navigation.
    The matcher extension does have a "list" mode where you get an
    overlay with the whole list and select by number. That's what I
    started with in mine, but I found it's really hard to use when there
    are a lot of matches. Especially with sha1s.
> Do you think it should be in contrib for better discoverability (than
> burying it in the mail archive)? A separate git repo is also ok, but I
> guess that's just more burden.

I'm not sure it makes sense in git's contrib. It's really more about urxvt than it is about git.

-Peff
Previous: Duy NguyenNext: Duy Nguyen
Message 10 of 12 in “Shortcuts to quickly refer to a commit name with keyboard”
  1. Shortcuts to quickly refer to a commit name with keyboardNguyễn Thái Ngọc Duy, Jan 20, 2017
  2. Johannes SchindelinJan 20, 2017
  3. Duy NguyenJan 20, 2017
  4. Johannes SchindelinJan 20, 2017
  5. Jeff KingJan 20, 2017
  6. Junio C HamanoJan 20, 2017
  7. Jacob KellerJan 20, 2017
  8. Jeff KingJan 20, 2017
  9. Duy NguyenJan 21, 2017
  10. Jeff KingJan 21, 2017
  11. Duy NguyenFeb 5, 2017
  12. Jacob KellerFeb 5, 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.