From: Jacob Keller <jacob.keller@gmail.com>
To: Jeff King <peff@peff.net>
Cc: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>,
"Git mailing list" <git@vger.kernel.org>
Subject: Re: [PATCH/TOY] Shortcuts to quickly refer to a commit name with keyboard
Date: Fri, 20 Jan 2017 11:16:15 -0800 [thread overview]
Message-ID: <CA+P7+xoMTX5n_h+5MytZwVqKjqa0wdNKCeDtH29A_+WSfr6gTQ@mail.gmail.com> (raw)
In-Reply-To: <20170120160942.srqf4y5w5r6feidw@sigill.intra.peff.net>
On Fri, Jan 20, 2017 at 8:09 AM, Jeff King <peff@peff.net> wrote:
> On Fri, Jan 20, 2017 at 05:22:49PM +0700, Nguyễn Thái Ngọc Duy wrote:
>
>> OK This patch is horrible. Though the idea is cool and I've found it
>> very useful. So here it is. Perhaps the idea may be revised a bit
>> that's more suitable for more than one user.
>>
>> The problem is old, SHA-1 name is not keyboard-friendly, even in
>> abbreviated form. And recent change has made abbrev form longer,
>> harder to type. Most of the time I just go with copy/paste with the
>> mouse, which I don't like. name-rev helps a bit, but it's still long
>> to type (especially with all the ^ and ~ that requires holding shift
>> down).
>
> Not really a comment on your patch itself, but I think a lot of people
> solve this at a higher level, either in their terminal or via a tool
> like tmux.
>
> I recently taught urxvt to recognize sha1s and grab them via keyboard
> hints, and I'm finding it quite useful. Here's what it looks like if
> you're interested:
>
> http://peff.net/git-hints.gif
>
> The hints technique is taken from pentadactyl (which I also use), but
> the urxvt port is mine. I'm happy to share the code.
>
> Which isn't to say solving it inside Git is wrong, but I've found it
> really convenient for two reasons:
>
> 1. It works whenever you see a sha1, not just in git commands (so
> emails, inside commit messages, etc).
>
> 2. It doesn't take any screen space until you're ready to select.
>
> The big downside is that it's scraping the screen, so you're guessing at
> what is a sha1. False positives are a little annoying, but usually not
> that big a deal because you're already looking at what you want to
> select, and the hint pops up right there.
>
> -Peff
I would be interested in the code for this.. I'm curious if I can
adapt it to my use of tmux.
Thanks,
Jake
next prev parent reply other threads:[~2017-01-20 19:16 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-20 10:22 [PATCH/TOY] Shortcuts to quickly refer to a commit name with keyboard Nguyễn Thái Ngọc Duy
2017-01-20 10:46 ` Johannes Schindelin
2017-01-20 11:01 ` Duy Nguyen
2017-01-20 15:21 ` Johannes Schindelin
2017-01-20 16:09 ` Jeff King
2017-01-20 18:27 ` Junio C Hamano
2017-01-20 19:16 ` Jacob Keller [this message]
2017-01-20 19:25 ` Jeff King
2017-01-21 12:44 ` Duy Nguyen
2017-01-21 14:03 ` Jeff King
2017-02-05 10:39 ` Duy Nguyen
2017-02-05 22:45 ` Jacob Keller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CA+P7+xoMTX5n_h+5MytZwVqKjqa0wdNKCeDtH29A_+WSfr6gTQ@mail.gmail.com \
--to=jacob.keller@gmail.com \
--cc=git@vger.kernel.org \
--cc=pclouds@gmail.com \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).