From: Thomas Badie <thomas.badie@gmail.com>
To: Thomas Rast <trast@student.ethz.ch>
Cc: git@vger.kernel.org, Sitaram Chamarty <sitaramc@gmail.com>
Subject: Re: A new way to get a sha1?
Date: Mon, 30 Jul 2012 19:17:00 +0200 [thread overview]
Message-ID: <CAFjFENq7jXA70KJSk0U7LpAupJv3tkRAfgyMKA1RewW=ttsUdQ@mail.gmail.com> (raw)
In-Reply-To: <87k3xli6mn.fsf@thomas.inf.ethz.ch>
2012/7/30 Thomas Rast <trast@student.ethz.ch>:
> Thomas Badie <thomas.badie@gmail.com> writes:
>
>> The idea is to have a perl module which run through
>> the log history and print 10 shortlog associated with a number
>> from 0 to 9, and a message below "Select commit [| 0, 9 |] or
>> next row ?" or this kind of message with several options.
>>
>> So I ask to the community if this module is interesting for git.
>> It can be integrated everywhere a sha1 is requested (git rebase,
>> git reset, ...). IMHO, it can be an enhancement.
>
> I think this is too specific. If you want full interactivity, use a
> real interactive tool like tig.
Second suggestion for tig. I must definitely try it.
> However, your post and some quick searching gave me another idea. Bash
> actually has features to let you edit the current command line from
> within key bindings. So if only we had some clever utility, let's call
> it lineselect for lack of a better name, that let us do
>
> git log --oneline <args> | lineselect
>
> then we could paste the selected SHA1 into the command line. That would
> be really neat, wouldn't it?
>
> I haven't found such a utility, so below is my first shot at making
> something useful. It has:
>
> * a few keybinds that should make most people happy
> * color rendering (yay), but because of issues with the default
> rendering, it sets white-on-black by default
> * an optional regex arg to select only parts of the lines
Very interesting. I tried it and it is nice. I fix a little bug ("Use of
uninitialized...") on my fork. I will take a look on the things that
don't work yet ;) I'm pretty sure that there is a lot of possible
usage of this script.
> Things that notably _don't_ work yet:
>
> * cursor keys (I have no idea why it doesn't match KEY_UP etc.)
> * ANSI attributes (colors work, of sorts)
> * Searching the next occurrence of a search string
>
> But you can probably guess that those aren't a huge problem for me.
>
> I made a little repo too, for all your forking needs:
>
> https://github.com/trast/lineselect.git
> git://github.com/trast/lineselect.git
Thanks for sharing it!
> Thanks for the idea :-)
You're very welcome!
--
Thomas "Enki" Badie
prev parent reply other threads:[~2012-07-30 17:17 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-30 12:11 A new way to get a sha1? Thomas Badie
2012-07-30 12:28 ` Jan Engelhardt
2012-07-30 15:45 ` Junio C Hamano
2012-07-30 16:57 ` Thomas Badie
2012-07-30 18:16 ` Martin Langhoff
2012-07-30 18:29 ` Junio C Hamano
2012-07-30 18:42 ` Martin Langhoff
2012-07-30 18:40 ` Andreas Schwab
2012-07-30 16:40 ` Thomas Badie
2012-07-30 16:51 ` Jeff King
2012-07-30 17:33 ` Thomas Badie
2012-07-30 17:55 ` Andreas Schwab
2012-07-30 12:41 ` Sitaram Chamarty
2012-07-30 16:49 ` Thomas Badie
2012-07-30 15:57 ` Thomas Rast
2012-07-30 17:17 ` Thomas Badie [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAFjFENq7jXA70KJSk0U7LpAupJv3tkRAfgyMKA1RewW=ttsUdQ@mail.gmail.com' \
--to=thomas.badie@gmail.com \
--cc=git@vger.kernel.org \
--cc=sitaramc@gmail.com \
--cc=trast@student.ethz.ch \
/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.
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 NNTP newsgroup(s).