From: "Lee Marlow" <lee.marlow@gmail.com>
To: "Shawn O. Pearce" <spearce@spearce.org>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] bash completion: Add completion for 'git grep'
Date: Sun, 3 Aug 2008 01:31:13 -0600 [thread overview]
Message-ID: <7968d7490808030031v39726af6r9f88feb28df02de7@mail.gmail.com> (raw)
In-Reply-To: <20080802210525.GD24723@spearce.org>
On Sat, Aug 2, 2008 at 3:05 PM, Shawn O. Pearce <spearce@spearce.org> wrote:
>
> Hmm. The has_doubledash test seems redundant since we don't do
> anything with args that aren't --foo. Even though git-grep will
> accept a tree-ish and thus completion of __git_refs here may
> make sense.
>
> But that is very much a user question. Do users mostly search a
> file in the current working directory, or do they mostly search
> a tree-ish?
I haven't found myself using grep to search anything but the current
working directory. I wonder whether __git_complete_file would be
better than __git_refs. My issue with __git_complete_file in this
case and also doing completion for 'git mv' is that it falls back to
just __git_refs. Would it be better if it fell back to __git_refs and
ls-tree for HEAD? That way when using completion to get to
Documentation/git-grep.txt, it doesn't also show completions for
Documentation/git-grep.{1,html,xml}.
-Lee
next prev parent reply other threads:[~2008-08-03 7:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-02 0:56 [PATCH] bash completion: Add completion for 'git grep' Lee Marlow
2008-08-02 21:05 ` Shawn O. Pearce
2008-08-03 7:31 ` Lee Marlow [this message]
2008-08-04 4:06 ` Shawn O. Pearce
2008-08-04 5:26 ` Lee Marlow
2008-08-04 14:52 ` Shawn O. Pearce
2008-08-04 14:53 ` Shawn O. Pearce
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=7968d7490808030031v39726af6r9f88feb28df02de7@mail.gmail.com \
--to=lee.marlow@gmail.com \
--cc=git@vger.kernel.org \
--cc=spearce@spearce.org \
/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).