2012/7/30 Thomas Rast <tr...@student.ethz.ch>:
> Thomas Badie <thomas.ba...@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
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to