From: Jeff King <peff@peff.net>
To: Duy Nguyen <pclouds@gmail.com>
Cc: Josh Hagins <hagins.josh@gmail.com>,
Thiago Farina <tfransosi@gmail.com>,
Git Mailing List <git@vger.kernel.org>
Subject: Re: multiple source file extensions
Date: Fri, 1 May 2015 22:35:04 -0400 [thread overview]
Message-ID: <20150502023504.GC587@peff.net> (raw)
In-Reply-To: <CACsJy8C2aztHWHP0_U8VWJxMrT2HE7aYBxDQTnSWS1TVwCnedw@mail.gmail.com>
On Sat, May 02, 2015 at 09:11:16AM +0700, Duy Nguyen wrote:
> On Sat, May 2, 2015 at 9:04 AM, Duy Nguyen <pclouds@gmail.com> wrote:
> > On Fri, May 01, 2015 at 09:11:01PM -0400, Jeff King wrote:
> >> Unfortunately there is no way to use curly braces with git's pathspec,
> >> so you have to write out three separate `*` arguments rather than using
> >> the shell-style {cc,cpp,h}.
> >
> > Noted. Need to add curly brace support in pathspec :-)
>
> Naah people can just do
>
> git grep pattern -- '*'.{cc,cpp,h}
>
> and bash will take care of expanding it into three separate arguments.
> Obscure, but pathspec is also obscure..
Thanks, I had a vague notion that I should be able to convince the shell
to do it for me, but of course "*.{cc,cpp,h}" doesn't work. I always
forget about breaking up parameters into two parts with different
quoting like this.
I agree we don't really need curly braces in pathspecs. :)
-Peff
next prev parent reply other threads:[~2015-05-02 2:35 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-02 0:40 multiple source file extensions Thiago Farina
2015-05-02 0:49 ` Josh Hagins
2015-05-02 1:11 ` Jeff King
2015-05-02 2:04 ` Duy Nguyen
2015-05-02 2:11 ` Duy Nguyen
2015-05-02 2:35 ` Jeff King [this message]
2015-05-02 7:11 ` Eric Sunshine
2015-05-03 2:26 ` Junio C Hamano
2015-05-02 2:33 ` Jeff King
2015-05-04 22:12 ` Thiago Farina
2015-05-05 3:43 ` Jeff King
2015-05-05 17:30 ` Mikael Magnusson
2015-05-05 19:12 ` Jeff King
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=20150502023504.GC587@peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=hagins.josh@gmail.com \
--cc=pclouds@gmail.com \
--cc=tfransosi@gmail.com \
/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).