Subject: bug#32549: Allow passing custom options to vc-git-grep

From: Noam Postavsky <[email-masked]>
Date: Tue, 28 Aug 2018 19:14:56 -0400

Federico Tedin <[email-masked]> writes:

> (let ((current-prefix-arg '(4)))
>   (vc-git-grep "something" "*.el" "."))
>
> And then I also tried:
>
> (let ((current-prefix-arg '(4)))
>   (projectile-grep))
>
> In both cases, I am prompted for the full git-grep command (and
> nothing else).

Doesn't projectile-grep prompt you for a regexp?  I don't have it
installed here, but it looks like you have to pass a non-nil ARG to get
prompted for filenames, i.e.,

  (let ((current-prefix-arg '(4)))
    (projectile-grep nil t))

> Is there any way to set a default set of arguments in order to avoid
> typing them when invoking the function?

Not sure I follow, when you pass "something" and "*.el" to the function,
those get inserted into the default command so you don't have to type
them interactively.