From: Francis Moreau <francis.moro@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Jeff King <peff@peff.net>,
Johannes Schindelin <Johannes.Schindelin@gmx.de>,
git@vger.kernel.org
Subject: Re: [PATCH 0/2] Teach 'git grep' about --open-files-in-pager=[<pager>]
Date: Fri, 26 Mar 2010 21:50:22 +0100 [thread overview]
Message-ID: <m239zmdcz5.fsf@gmail.com> (raw)
In-Reply-To: <7vwrwykhee.fsf@alter.siamese.dyndns.org> (Junio C. Hamano's message of "Fri, 26 Mar 2010 12:32:57 -0700")
Junio C Hamano <gitster@pobox.com> writes:
> Jeff King <peff@peff.net> writes:
>
>> On Fri, Mar 26, 2010 at 11:48:41AM +0100, Johannes Schindelin wrote:
>>
>>> This supports opening the results of a 'git grep' directly in a pager
>>> (where the pager can be 'vi', too).
>>
>> This is not an argument against your patch, but you may be interested in
>> an alternate method:
>>
>> git grep -n $pattern >grep.out
>> vim -q grep.out
>>
>> The advantage is that the editor understands the output as a "quickfix"
>> list and lets you cycle through the hits (just like you might with
>> compiler errors). The disadvantage is that quickfix is a vim extension,
>> so "less" and stock "vi" can't do this (I imagine emacs has a similar
>> feature). It's also obviously a little more typing, but you can hide it
>> inside an alias quite easily.
>
> "M-x grep-find" mode is designed for this,
Do you mean "M-x grep" ? I don't see the point to use "M-x grep-find".
> and I often run "git grep -n" in that mode..
I always need to pass the '--no-pager' switch: "git --no-pager grep -n"
since git doesn't detect that its output is sent to a 'dumb' terminal.
--
Francis
next prev parent reply other threads:[~2010-03-26 20:50 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-26 10:48 [PATCH 0/2] Teach 'git grep' about --open-files-in-pager=[<pager>] Johannes Schindelin
2010-03-26 10:49 ` [PATCH 1/2] grep: Add the option '--open-files-in-pager' Johannes Schindelin
2010-03-28 4:09 ` Jonathan Nieder
2010-03-29 17:13 ` Johannes Schindelin
2010-03-29 18:17 ` Junio C Hamano
2010-03-26 10:49 ` [PATCH 2/2] grep -P: allow optional argument specifying the pager (or editor) Johannes Schindelin
2010-03-26 10:50 ` Johannes Schindelin
2010-03-26 11:39 ` [PATCH 0/2] Teach 'git grep' about --open-files-in-pager=[<pager>] Bert Wesarg
2010-03-26 16:18 ` Johannes Schindelin
2010-03-26 20:07 ` Bert Wesarg
2010-03-26 12:46 ` Jeff King
2010-03-26 16:14 ` Johannes Schindelin
2010-03-26 20:33 ` Jeff King
2010-03-26 19:32 ` Junio C Hamano
2010-03-26 20:50 ` Francis Moreau [this message]
2010-03-27 1:09 ` Junio C Hamano
2010-03-27 15:19 ` Francis Moreau
2010-03-27 17:23 ` Junio C Hamano
2010-03-27 20:29 ` Francis Moreau
2010-03-26 19:49 ` Jon Seymour
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=m239zmdcz5.fsf@gmail.com \
--to=francis.moro@gmail.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.